diff options
author | Jeff Muizelaar <jeff@infidigm.net> | 2005-11-23 21:26:11 +0000 |
---|---|---|
committer | Jeff Muizelaar <jeff@infidigm.net> | 2005-11-23 21:26:11 +0000 |
commit | 25e919cd667225852c6b85616fcb120159a82b8f (patch) | |
tree | fc6ad1ff016268b885763ee1fae2b97fec274d2a | |
parent | 24e23a0c60d2bdabe9fde03e4180644cad87e451 (diff) |
2005-11-23 Jeff Muizelaar <jeff@infidigm.net>
* test-gen/image.pl:
* test-gen/inline-image.pl:
* test-gen/mask.pl:
* test-gen/text.pl:
* test-gen/type3.pl:
* tests/image.pdf:
* tests/inline-image.pdf:
* tests/mask.pdf:
* tests/text.pdf:
* tests/type3.pdf:
Cleanup the generation scripts a little based on comments from Leonard
Rosenthol.
-rw-r--r-- | ChangeLog | 15 | ||||
-rwxr-xr-x | test-gen/image.pl | 5 | ||||
-rwxr-xr-x | test-gen/inline-image.pl | 7 | ||||
-rwxr-xr-x | test-gen/mask.pl | 4 | ||||
-rwxr-xr-x | test-gen/text.pl | 5 | ||||
-rwxr-xr-x | test-gen/type3.pl | 1 | ||||
-rw-r--r-- | tests/image.pdf | bin | 113369 -> 113219 bytes | |||
-rw-r--r-- | tests/inline-image.pdf | 18 | ||||
-rw-r--r-- | tests/mask.pdf | 10 | ||||
-rw-r--r-- | tests/text.pdf | bin | 113488 -> 113445 bytes | |||
-rw-r--r-- | tests/type3.pdf | 21 |
11 files changed, 45 insertions, 41 deletions
@@ -1,3 +1,18 @@ +2005-11-23 Jeff Muizelaar <jeff@infidigm.net> + + * test-gen/image.pl: + * test-gen/inline-image.pl: + * test-gen/mask.pl: + * test-gen/text.pl: + * test-gen/type3.pl: + * tests/image.pdf: + * tests/inline-image.pdf: + * tests/mask.pdf: + * tests/text.pdf: + * tests/type3.pdf: + Cleanup the generation scripts a little based on comments from Leonard + Rosenthol. + 2005-11-22 Jeff Muizelaar <jeff@infidigm.net> * Makefile: diff --git a/test-gen/image.pl b/test-gen/image.pl index 9a95a5c..a12f397 100755 --- a/test-gen/image.pl +++ b/test-gen/image.pl @@ -10,8 +10,6 @@ $root = Text::PDF::Pages->new($pdf); # Make a page tree in the document $root->proc_set("PDF", "Text"); # Say that all pages have PDF and Text instructions $root->bbox(0, 0, 595, 840); # hardwired page size A4 (for this app.) for all pages $page = Text::PDF::Page->new($pdf, $root); # Make a new page in the tree -$font = Text::PDF::SFont->new($pdf, 'Helvetica', 'F0'); # Make a new font in the document -$root->add_font($font); # Tell all pages about the font my ($w,$h,$bpc,$cs,$img)=parseImage('romedalen.ppm'); my $key='IMG1'; @@ -34,8 +32,7 @@ $x = 100; $y = 500; $sx = $w/3; $sy = $h/3; -$page->add("0 0 34 rg\n"); -$page->add(sprintf("%0.6f %0.6f %0.6f %0.6f %0.6f %0.6f cm\n", $sx,0,0,$sy,$x,$y)); +$page->add(sprintf("%0.3f %0.3f %0.3f %0.3f %0.3f %0.3f cm\n", $sx,0,0,$sy,$x,$y)); $page->add("/$key Do\n"); $page->add("Q"); #restoreState $pdf->out_file($ARGV[0]); # output the document to a file diff --git a/test-gen/inline-image.pl b/test-gen/inline-image.pl index 4cfd905..c5bada9 100755 --- a/test-gen/inline-image.pl +++ b/test-gen/inline-image.pl @@ -7,7 +7,6 @@ use Text::PDF::SFont; do "image.inc"; $pdf = Text::PDF::File->new; # Make up a new document $root = Text::PDF::Pages->new($pdf); # Make a page tree in the document -$root->proc_set("PDF", "Text"); # Say that all pages have PDF and Text instructions $root->bbox(0, 0, 595, 840); # hardwired page size A4 (for this app.) for all pages $page = Text::PDF::Page->new($pdf, $root); # Make a new page in the tree $font = Text::PDF::SFont->new($pdf, 'Helvetica', 'F0'); # Make a new font in the document @@ -21,8 +20,7 @@ $x = 100; $y = 500; $sx = $w/3; $sy = $h/3; -#$page->add("0 0 34 rg\n"); -$page->add(sprintf("%0.6f %0.6f %0.6f %0.6f %0.6f %0.6f cm\n", $sx,0,0,$sy,$x+100,$y)); +$page->add(sprintf("%0.3f %0.3f %0.3f %0.3f %0.3f %0.3f cm\n", $sx,0,0,$sy,$x+100,$y)); $page->add("BI\n"); $page->add("/W $w\n"); $page->add("/H $h\n"); @@ -33,8 +31,7 @@ $page->add($img); $page->add("\nEI\n"); $page->add("Q\n"); #restoreState $page->add("q\n"); -$page->add("0 0 34 rg\n"); -$page->add(sprintf("%0.6f %0.6f %0.6f %0.6f %0.6f %0.6f cm\n", $sx,0,0,$sy,$x,$y)); +$page->add(sprintf("%0.3f %0.3f %0.3f %0.3f %0.3f %0.3f cm\n", $sx,0,0,$sy,$x,$y)); $page->add("BI\n"); $page->add("/W $w\n"); $page->add("/H $h\n"); diff --git a/test-gen/mask.pl b/test-gen/mask.pl index d823ce9..2a4939a 100755 --- a/test-gen/mask.pl +++ b/test-gen/mask.pl @@ -30,8 +30,8 @@ $root->{'Resources'}->{'XObject'}=PDFDict(); $root->{'Resources'}->{'XObject'}->{$key}=$xo; $page->add("q\n"); #saveState -$page->add("0 0 34 rg\n"); -$page->add(sprintf("%0.6f %0.6f %0.6f %0.6f %0.6f %0.6f cm\n", $w,0,0,$h,100,500)); +$page->add("0 0 1 rg\n"); +$page->add(sprintf("%0.3f %0.3f %0.3f %0.3f %0.3f %0.3f cm\n", $w,0,0,$h,100,500)); $page->add("/$key Do\n"); $page->add("Q"); #restoreState $pdf->out_file($ARGV[0]); # output the document to a file diff --git a/test-gen/text.pl b/test-gen/text.pl index edc590e..9bca848 100755 --- a/test-gen/text.pl +++ b/test-gen/text.pl @@ -7,7 +7,6 @@ use Text::PDF::SFont; do "image.inc"; $pdf = Text::PDF::File->new; # Make up a new document $root = Text::PDF::Pages->new($pdf); # Make a page tree in the document -$root->proc_set("PDF", "Text"); # Say that all pages have PDF and Text instructions $root->bbox(0, 0, 595, 840); # hardwired page size A4 (for this app.) for all pages $page = Text::PDF::Page->new($pdf, $root); # Make a new page in the tree $font = Text::PDF::SFont->new($pdf, 'Helvetica', 'F0'); # Make a new font in the document @@ -35,10 +34,10 @@ $x = 100; $y = 500; $sx = $w; $sy = $h; -$page->add(sprintf("%0.6f %0.6f %0.6f %0.6f %0.6f %0.6f cm\n", $sx,0,0,$sy,$x,$y)); +$page->add(sprintf("%0.3f %0.3f %0.3f %0.3f %0.3f %0.3f cm\n", $sx,0,0,$sy,$x,$y)); $page->add("/$key Do\n"); $page->add("Q\n"); #restoreState -$page->add("0 0 34 rg\n"); +$page->add("0 0 1 rg\n"); $page->add("BT 1 0 0 1 100 600 Tm /F0 48 Tf 0 Tr (Hello World!) Tj ET"); # put some content on the page $pdf->out_file($ARGV[0]); # output the document to a file diff --git a/test-gen/type3.pl b/test-gen/type3.pl index 5c28d11..43b24d5 100755 --- a/test-gen/type3.pl +++ b/test-gen/type3.pl @@ -8,7 +8,6 @@ use Text::PDF::SFont; do "image.inc"; $pdf = Text::PDF::File->new; # Make up a new document $root = Text::PDF::Pages->new($pdf); # Make a page tree in the document -$root->proc_set("PDF", "Text"); # Say that all pages have PDF and Text instructions $root->bbox(0, 0, 595, 840); # hardwired page size A4 (for this app.) for all pages $page = Text::PDF::Page->new($pdf, $root); # Make a new page in the tree $font = Text::PDF::SFont->new($pdf, 'Helvetica', 'F0'); # Make a new font in the document diff --git a/tests/image.pdf b/tests/image.pdf Binary files differindex cc70a38..fabb746 100644 --- a/tests/image.pdf +++ b/tests/image.pdf diff --git a/tests/inline-image.pdf b/tests/inline-image.pdf index 5531708..c180b3c 100644 --- a/tests/inline-image.pdf +++ b/tests/inline-image.pdf @@ -10,14 +10,13 @@ endobj << /Type /Pages /Kids [ 3 0 R ] +/MediaBox [ 0 0 595 840 ] /Resources << /Font << /F0 4 0 R >> -/ProcSet [ /PDF /Text ] >> /Count 1 -/MediaBox [ 0 0 595 840 ] >> endobj 3 0 obj @@ -37,11 +36,11 @@ endobj endobj 5 0 obj << -/Length 295136 +/Length 295090 >> stream q -85.333333 0.000000 0.000000 64.000000 200.000000 500.000000 cm +85.333 0.000 0.000 64.000 200.000 500.000 cm BI /W 256 /H 192 @@ -53,8 +52,7 @@ ID EI Q q -0 0 34 rg -85.333333 0.000000 0.000000 64.000000 100.000000 500.000000 cm +85.333 0.000 0.000 64.000 100.000 500.000 cm BI /W 256 /H 192 @@ -72,14 +70,14 @@ xref 0000000000 65535 f 0000000015 00000 n 0000000064 00000 n -0000000212 00000 n -0000000279 00000 n -0000000359 00000 n +0000000188 00000 n +0000000255 00000 n +0000000335 00000 n trailer << /Root 1 0 R /Size 6 >> startxref -295548 +295478 %%EOF diff --git a/tests/mask.pdf b/tests/mask.pdf index 55a11ca..d94098a 100644 --- a/tests/mask.pdf +++ b/tests/mask.pdf @@ -48,12 +48,12 @@ endstream endobj 5 0 obj << -/Length 88 +/Length 69 >> stream q -0 0 34 rg -171.000000 0.000000 0.000000 128.000000 100.000000 500.000000 cm +0 0 1 rg +171.000 0.000 0.000 128.000 100.000 500.000 cm /IMG1 Do Q endstream @@ -69,12 +69,12 @@ xref 0000000217 00000 n 0000000284 00000 n 0000000781 00000 n -0000000918 00000 n +0000000899 00000 n trailer << /Root 1 0 R /Size 7 >> startxref -937 +918 %%EOF diff --git a/tests/text.pdf b/tests/text.pdf Binary files differindex 1da3e92..f8c753b 100644 --- a/tests/text.pdf +++ b/tests/text.pdf diff --git a/tests/type3.pdf b/tests/type3.pdf index 030209d..9500847 100644 --- a/tests/type3.pdf +++ b/tests/type3.pdf @@ -10,15 +10,14 @@ endobj << /Type /Pages /Kids [ 3 0 R ] +/MediaBox [ 0 0 595 840 ] /Resources << /Font << /F0 4 0 R /FTYPE3 9 0 R >> -/ProcSet [ /PDF /Text ] >> /Count 1 -/MediaBox [ 0 0 595 840 ] >> endobj 3 0 obj @@ -101,19 +100,19 @@ xref 0000000000 65535 f 0000000015 00000 n 0000000064 00000 n -0000000226 00000 n -0000000294 00000 n -0000000374 00000 n -0000000445 00000 n -0000000563 00000 n -0000000672 00000 n -0000000719 00000 n -0000000913 00000 n +0000000202 00000 n +0000000270 00000 n +0000000350 00000 n +0000000421 00000 n +0000000539 00000 n +0000000648 00000 n +0000000695 00000 n +0000000889 00000 n trailer << /Root 1 0 R /Size 11 >> startxref -1020 +996 %%EOF |