[poppler] test/test-gen: image.pl, 1.2, 1.3 inline-image.pl, 1.1, 1.2 mask.pl, 1.2, 1.3 text.pl, 1.2, 1.3 type3.pl, 1.1, 1.2

Jeff Muizelaar jrmuizel at freedesktop.org
Wed Nov 23 13:26:13 PST 2005


Update of /cvs/poppler/test/test-gen
In directory gabe:/tmp/cvs-serv16500/test-gen

Modified Files:
	image.pl inline-image.pl mask.pl text.pl type3.pl 
Log Message:
2005-11-23  Jeff Muizelaar  <jeff at 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.


Index: image.pl
===================================================================
RCS file: /cvs/poppler/test/test-gen/image.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- image.pl	21 May 2005 16:40:35 -0000	1.2
+++ image.pl	23 Nov 2005 21:26:11 -0000	1.3
@@ -10,8 +10,6 @@
 $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 @@
 $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

Index: inline-image.pl
===================================================================
RCS file: /cvs/poppler/test/test-gen/inline-image.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- inline-image.pl	23 Nov 2005 00:44:16 -0000	1.1
+++ inline-image.pl	23 Nov 2005 21:26:11 -0000	1.2
@@ -7,7 +7,6 @@
 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 @@
 $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("\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");

Index: mask.pl
===================================================================
RCS file: /cvs/poppler/test/test-gen/mask.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- mask.pl	21 May 2005 16:40:35 -0000	1.2
+++ mask.pl	23 Nov 2005 21:26:11 -0000	1.3
@@ -30,8 +30,8 @@
 $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

Index: text.pl
===================================================================
RCS file: /cvs/poppler/test/test-gen/text.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- text.pl	21 May 2005 16:40:35 -0000	1.2
+++ text.pl	23 Nov 2005 21:26:11 -0000	1.3
@@ -7,7 +7,6 @@
 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 @@
 $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

Index: type3.pl
===================================================================
RCS file: /cvs/poppler/test/test-gen/type3.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- type3.pl	3 Jun 2005 03:12:27 -0000	1.1
+++ type3.pl	23 Nov 2005 21:26:11 -0000	1.2
@@ -8,7 +8,6 @@
 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



More information about the poppler mailing list