diff options
author | xlou <xlou@chromium.org> | 2018-01-31 22:24:05 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-31 22:24:05 +0000 |
commit | 66ce22c6cdb38ca5941c175aea371df92ae9cb8b (patch) | |
tree | 4557f587133e3005bde76d9b4fc12d19bd899b74 /testing | |
parent | bb04c59ec30b00cae6c902fa8bc128220bcff4df (diff) | |
download | pdfium-66ce22c6cdb38ca5941c175aea371df92ae9cb8b.tar.xz |
Experimental API for N-up feature support for print
FPDF_ImportNPagesToOne function is added to support N-up feature
for print.
If numPagesOnXAxis * numPagesOnYAxis == 0
Returns a nullptr.
If numPagesOnXAxis * numPagesOnYAxis == 1
Creates a new PDF document, and import one page to each output
page of the PDF document
If numPagesOnXAxis * numPagesOnYAxis > 1,
FPDF_ImportNPagesToOne imports multiple pages onto the same page.
This feature is intended for print pipeline to use.
Change-Id: Iec1afffe377ff9b7fef3cb33414b29b324154fa4
Reviewed-on: https://pdfium-review.googlesource.com/22050
Commit-Queue: Shirleen Lou <xlou@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'testing')
-rw-r--r-- | testing/resources/hello_world_multi_pages.in | 98 | ||||
-rw-r--r-- | testing/resources/hello_world_multi_pages.pdf | 114 |
2 files changed, 212 insertions, 0 deletions
diff --git a/testing/resources/hello_world_multi_pages.in b/testing/resources/hello_world_multi_pages.in new file mode 100644 index 0000000000..125b8ea090 --- /dev/null +++ b/testing/resources/hello_world_multi_pages.in @@ -0,0 +1,98 @@ +{{header}} +{{object 1 0}} << + /Type /Catalog + /Pages 2 0 R +>> +endobj +{{object 2 0}} << + /Type /Pages + /MediaBox [ 0 0 200 250 ] + /Count 5 + /Kids [ 3 0 R 5 0 R 7 0 R 9 0 R 11 0 R ] +>> +endobj +{{object 3 0}} << + /Type /Page + /Parent 2 0 R + /Contents 4 0 R +>> +endobj +{{object 4 0}} << +>> +stream +q +1 1 0 rg +100 0 30 50 re B* +70 67 50 30 re B* +Q +endstream +endobj +{{object 5 0}} << + /Type /Page + /Parent 2 0 R + /Rotate 90 + /Contents 6 0 R +>> +endobj +{{object 6 0}} << +>> +stream +q +0 1 1 rg +100 0 30 50 re B* +70 67 50 30 re B* +Q +endstream +endobj +{{object 7 0}} << + /Type /Page + /Parent 2 0 R + /Contents 8 0 R +>> +endobj +{{object 8 0}} << +>> +stream +q +1 0 0 rg +100 0 30 50 re B* +70 67 50 30 re B* +Q +endstream +endobj +{{object 9 0}} << + /Type /Page + /Parent 2 0 R + /Contents 10 0 R +>> +{{object 10 0}} << +>> +stream +q +0 1 0 rg +100 0 30 50 re B* +100 150 50 30 re B* +Q +endstream +endobj +endobj +{{object 11 0}} << + /Type /Page + /Parent 2 0 R + /Contents 12 0 R +>> +endobj +{{object 12 0}} << +>> +stream +q +0 0 0 rg +0 90 80 60 re B* +100 150 50 30 re B* +Q +endstream +endobj +{{xref}} +{{trailer}} +{{startxref}} +%%EOF diff --git a/testing/resources/hello_world_multi_pages.pdf b/testing/resources/hello_world_multi_pages.pdf new file mode 100644 index 0000000000..bacb1dd3a8 --- /dev/null +++ b/testing/resources/hello_world_multi_pages.pdf @@ -0,0 +1,114 @@ +%PDF-1.7 +% ò¤ô +1 0 obj << + /Type /Catalog + /Pages 2 0 R +>> +endobj +2 0 obj << + /Type /Pages + /MediaBox [ 0 0 200 250 ] + /Count 5 + /Kids [ 3 0 R 5 0 R 7 0 R 9 0 R 11 0 R ] +>> +endobj +3 0 obj << + /Type /Page + /Parent 2 0 R + /Contents 4 0 R +>> +endobj +4 0 obj << +>> +stream +q +1 1 0 rg +100 0 30 50 re B* +70 67 50 30 re B* +Q +endstream +endobj +5 0 obj << + /Type /Page + /Parent 2 0 R + /Rotate 90 + /Contents 6 0 R +>> +endobj +6 0 obj << +>> +stream +q +0 1 1 rg +100 0 30 50 re B* +70 67 50 30 re B* +Q +endstream +endobj +7 0 obj << + /Type /Page + /Parent 2 0 R + /Contents 8 0 R +>> +endobj +8 0 obj << +>> +stream +q +1 0 0 rg +100 0 30 50 re B* +70 67 50 30 re B* +Q +endstream +endobj +9 0 obj << + /Type /Page + /Parent 2 0 R + /Contents 10 0 R +>> +10 0 obj << +>> +stream +q +0 1 0 rg +100 0 30 50 re B* +100 150 50 30 re B* +Q +endstream +endobj +endobj +11 0 obj << + /Type /Page + /Parent 2 0 R + /Contents 12 0 R +>> +endobj +12 0 obj << +>> +stream +q +0 0 0 rg +0 90 80 60 re B* +100 150 50 30 re B* +Q +endstream +endobj +xref +0 13 +0000000000 65535 f +0000000015 00000 n +0000000068 00000 n +0000000186 00000 n +0000000255 00000 n +0000000342 00000 n +0000000424 00000 n +0000000511 00000 n +0000000580 00000 n +0000000667 00000 n +0000000730 00000 n +0000000827 00000 n +0000000898 00000 n +trailer<< /Root 1 0 R /Size 13 >> +startxref +987 +%%EOF |