From c7f66edd224446deefe68506b7ebed871eb5c8c2 Mon Sep 17 00:00:00 2001 From: xlou Date: Thu, 11 Oct 2018 21:15:18 +0000 Subject: Add functions to get/set ArtBox. There are PDFs that use ArtBox. In some use cases, user may scale a page, scale up/down MediaBox and CropBox. So if ArtBox exists, it needs to be scaled as well. Bug:409670 Change-Id: I78ac7afa66942352277f856514bdd9b15dda270b Reviewed-on: https://pdfium-review.googlesource.com/c/43931 Reviewed-by: Lei Zhang Commit-Queue: Shirleen Lou --- testing/resources/cropped_text.in | 4 ++++ testing/resources/cropped_text.pdf | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'testing') diff --git a/testing/resources/cropped_text.in b/testing/resources/cropped_text.in index c8632de112..d3812dc476 100644 --- a/testing/resources/cropped_text.in +++ b/testing/resources/cropped_text.in @@ -41,6 +41,7 @@ endobj /Parent 2 0 R /MediaBox [ 0 0 200 200 ] /CropBox [ 50 50 150 150 ] + /ArtBox [ 55 65 140 145 ] /Resources << /Font << /F1 3 0 R @@ -55,6 +56,7 @@ endobj /Parent 2 0 R /MediaBox [ -50 -50 200 200 ] /CropBox [ 50 50 150 150 ] + /ArtBox [ 50 60 135 140 ] /Resources << /Font << /F1 3 0 R @@ -69,6 +71,7 @@ endobj /Parent 2 0 R /MediaBox [ 0 0 200 200 ] /CropBox [ 60 60 150 150 ] + /ArtBox [ 65 75 140 148 ] /Resources << /Font << /F1 3 0 R @@ -83,6 +86,7 @@ endobj /Parent 2 0 R /MediaBox [ 0 0 200 200 ] /CropBox [ 150 150 60 60 ] + /ArtBox [ 140 145 65 70 ] /Resources << /Font << /F1 3 0 R diff --git a/testing/resources/cropped_text.pdf b/testing/resources/cropped_text.pdf index 02d50c6545..676d44b49a 100644 --- a/testing/resources/cropped_text.pdf +++ b/testing/resources/cropped_text.pdf @@ -42,6 +42,7 @@ endobj /Parent 2 0 R /MediaBox [ 0 0 200 200 ] /CropBox [ 50 50 150 150 ] + /ArtBox [ 55 65 140 145 ] /Resources << /Font << /F1 3 0 R @@ -56,6 +57,7 @@ endobj /Parent 2 0 R /MediaBox [ -50 -50 200 200 ] /CropBox [ 50 50 150 150 ] + /ArtBox [ 50 60 135 140 ] /Resources << /Font << /F1 3 0 R @@ -70,6 +72,7 @@ endobj /Parent 2 0 R /MediaBox [ 0 0 200 200 ] /CropBox [ 60 60 150 150 ] + /ArtBox [ 65 75 140 148 ] /Resources << /Font << /F1 3 0 R @@ -84,6 +87,7 @@ endobj /Parent 2 0 R /MediaBox [ 0 0 200 200 ] /CropBox [ 150 150 60 60 ] + /ArtBox [ 140 145 65 70 ] /Resources << /Font << /F1 3 0 R @@ -102,13 +106,13 @@ xref 0000000229 00000 n 0000000305 00000 n 0000000439 00000 n -0000000638 00000 n -0000000841 00000 n -0000001040 00000 n +0000000666 00000 n +0000000897 00000 n +0000001124 00000 n trailer << /Root 1 0 R /Size 10 >> startxref -1239 +1351 %%EOF -- cgit v1.2.3