r4906 - in /packages/libpdf-table-perl/branches/upstream/current: Changes MANIFEST Makefile.PL README examples/pdf_table_test.pl examples/sample1.pl examples/table_of_lorem.pdf lib/PDF/Table.pm

gwolf at users.alioth.debian.org gwolf at users.alioth.debian.org
Wed Feb 28 21:11:25 CET 2007


Author: gwolf
Date: Wed Feb 28 21:11:25 2007
New Revision: 4906

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=4906
Log:
[svn-upgrade] Integrating new upstream version, libpdf-table-perl (0.9.3)

Added:
    packages/libpdf-table-perl/branches/upstream/current/examples/sample1.pl   (with props)
    packages/libpdf-table-perl/branches/upstream/current/examples/table_of_lorem.pdf
Removed:
    packages/libpdf-table-perl/branches/upstream/current/examples/pdf_table_test.pl
Modified:
    packages/libpdf-table-perl/branches/upstream/current/Changes
    packages/libpdf-table-perl/branches/upstream/current/MANIFEST
    packages/libpdf-table-perl/branches/upstream/current/Makefile.PL
    packages/libpdf-table-perl/branches/upstream/current/README
    packages/libpdf-table-perl/branches/upstream/current/lib/PDF/Table.pm

Modified: packages/libpdf-table-perl/branches/upstream/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpdf-table-perl/branches/upstream/current/Changes?rev=4906&op=diff
==============================================================================
--- packages/libpdf-table-perl/branches/upstream/current/Changes (original)
+++ packages/libpdf-table-perl/branches/upstream/current/Changes Wed Feb 28 21:11:25 2007
@@ -1,13 +1,36 @@
 Revision history for Perl extension PDF::Table.
 
-0.9  Thu Sep 14 18:02:26 2006
-	- original version; created by h2xs 1.23 with options
-		-XA -v 0.9 -n PDF::Table
+Version 0.9.3 - 27.12.2006
+----------------------------
+Added backward compatibility and now again params with '-' front are supported.
+  Both params with '-'and without are valid and can be even mixed together.
+  I excuse for changing the interface before.
+
+Added cell_props parameter wich can define properties for a single cell as specified by user.
+Thanks for cell_props patch to Bodo Bauer.
+
+Removed Version requirement of Perl 5.8.7 and only version ot 5.6.0 is required.
+Thanks to Jonas Pasche for reporting it.
+
+Updated examples/sample1.pl file to try the capabilities of the module immidiately after download.
+
+Documentation Update.
+
+Fixed bug with interpreting \n as special char but not as newline.
+Thanks to Jonas Pasche for reporting it.
+	(reminder: text with \n must be enclosed in double quotes i.e. "text\nnewline" )
+
+Fixed documentation inacuracy for text_block(). It is called as $pdftable->text_block() of course.
+Thanks to Jonas Pasche for reporting it.
+
+Fixed bug with first_line overlaping with former paragraph last line.
+Thanks to Jonas Pasche for reporting it and contributing a patch.
+
 
 Version 0.9.2 - 02.Oct.2006
 ----------------------------
 Fixed bug with 'col_props->bg_color' overiding 'header_props->bg_color'
-Reported by Giulio
+Thanks to Giulio Di Giuliomaria
 
 Fixed some documentation inacuracys.
 Added some new documentation.

Modified: packages/libpdf-table-perl/branches/upstream/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpdf-table-perl/branches/upstream/current/MANIFEST?rev=4906&op=diff
==============================================================================
--- packages/libpdf-table-perl/branches/upstream/current/MANIFEST (original)
+++ packages/libpdf-table-perl/branches/upstream/current/MANIFEST Wed Feb 28 21:11:25 2007
@@ -4,4 +4,4 @@
 README
 t/PDF-Table.t
 lib/PDF/Table.pm
-examples/pdf_table_test.pl
+examples/sample1.pl

Modified: packages/libpdf-table-perl/branches/upstream/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpdf-table-perl/branches/upstream/current/Makefile.PL?rev=4906&op=diff
==============================================================================
--- packages/libpdf-table-perl/branches/upstream/current/Makefile.PL (original)
+++ packages/libpdf-table-perl/branches/upstream/current/Makefile.PL Wed Feb 28 21:11:25 2007
@@ -1,4 +1,4 @@
-use 5.008007;
+use 5.006;
 use ExtUtils::MakeMaker;
 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
 # the contents of the Makefile that is written.

Modified: packages/libpdf-table-perl/branches/upstream/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpdf-table-perl/branches/upstream/current/README?rev=4906&op=diff
==============================================================================
--- packages/libpdf-table-perl/branches/upstream/current/README (original)
+++ packages/libpdf-table-perl/branches/upstream/current/README Wed Feb 28 21:11:25 2007
@@ -1,4 +1,4 @@
-PDF-Table version 0.9.2
+PDF-Table version 0.9.3
 =====================
 SOME NOTES
 

Added: packages/libpdf-table-perl/branches/upstream/current/examples/sample1.pl
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpdf-table-perl/branches/upstream/current/examples/sample1.pl?rev=4906&op=file
==============================================================================
--- packages/libpdf-table-perl/branches/upstream/current/examples/sample1.pl (added)
+++ packages/libpdf-table-perl/branches/upstream/current/examples/sample1.pl Wed Feb 28 21:11:25 2007
@@ -1,0 +1,117 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+use diagnostics;
+#Please use TABSTOP=4 for best view
+ use PDF::API2;
+ use Table;
+
+ my $pdftable = new PDF::Table;
+ my $pdf = new PDF::API2(-file => "table_of_lorem.pdf");
+ my $page = $pdf->page();
+ $pdf->mediabox('A4');
+ # A4 as defined by PDF::API2 is h=842 w=545 for portrait
+	
+ # some data to layout
+ my $some_data =[
+        ['Header',
+        'Row',
+        'Test'],
+        ['1 Lorem ipsum dolor',
+        'Donec odio neque, faucibus vel',
+        'consequat quis, tincidunt vel, felis.'],
+        ['Nulla euismod sem eget neque.',
+        'Donec odio neque',
+        'Sed eu velit.'],
+        ['Az sym bulgarin',
+        "i ne razbiram DESI\ngorniq \nezik",
+        "zatova reshih
+		da dobavq
+		edin ili dva
+		novi reda"],
+        ['da dobavq edin dva reda',
+        'v tozi primer',
+        'na bulgarski ezik s latinica'],
+        ['1 Lorem ipsum dolor',
+        'Donec odio neque, faucibus vel',
+        'consequat quis, tincidunt vel, felis.'],
+        ['Nulla euismod sem eget neque.',
+        'Donec odio neque',
+        'Sed eu velit.'],
+        ['Az sym bulgarin',
+        'i ne razbiram gorniq ezik',
+        'zatova reshih'],
+        ['da dobavq edin dva reda',
+        'v tozi primer',
+        'na bulgarski ezik s latinica'],
+ ];
+
+ # build the table layout
+ $pdftable->table(
+         # required params
+         $pdf,
+         $page,
+         $some_data,
+         x => 50,
+         -w => 495,
+         start_y => 792,
+         next_y  => 700,
+         -start_h => 400,
+         next_h  => 500,
+         # some optional params
+         -padding => 3,
+         padding_right => 10,
+         background_color_odd  => 'lightblue',
+         background_color_even => "#EEEEAA", #cell background color for even rows
+         header_props          => { 
+             bg_color   => "#F0AAAA",
+             font       => $pdf->corefont("Helvetica", -encoding => "utf8"),
+             font_size  => 14,
+             font_color => "#006600",
+             repeat     => 1,
+         },
+         column_props => [
+            {},
+            {
+                min_w => 250,
+                justify => "right",
+                font => $pdf->corefont("Times", -encoding => "latin1"),
+                font_size => 14,
+                font_color=> 'white',
+                background_color => '#8CA6C5',
+            },
+         ],
+         cell_props => [
+           [#This is the first(header) row of the table and here wins header_props
+             {
+               background_color => '#000000',
+               font_color       => 'blue',
+             },
+             # etc.
+           ],
+           [#Row 2 
+             {#Row 2 cell 1
+               background_color => '#000000',
+               font_color       => 'white',
+             },
+             {#Row 2 cell 2
+               background_color => '#AAAA00',
+               font_color       => 'red',
+             },
+             {#Row 2 cell 3
+               background_color => '#FFFFFF',
+               font_color       => 'green',
+             },
+             # etc.
+           ],
+           [#Row 3
+             {#Row 3 cell 1
+               background_color => '#AAAAAA',
+               font_color       => 'blue',
+             },
+             # etc.
+           ],
+           # etc.
+         ],
+  );
+$pdf->saveas();

Propchange: packages/libpdf-table-perl/branches/upstream/current/examples/sample1.pl
------------------------------------------------------------------------------
    svn:executable = *

Added: packages/libpdf-table-perl/branches/upstream/current/examples/table_of_lorem.pdf
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpdf-table-perl/branches/upstream/current/examples/table_of_lorem.pdf?rev=4906&op=file
==============================================================================
--- packages/libpdf-table-perl/branches/upstream/current/examples/table_of_lorem.pdf (added)
+++ packages/libpdf-table-perl/branches/upstream/current/examples/table_of_lorem.pdf Wed Feb 28 21:11:25 2007
@@ -1,0 +1,62 @@
+%PDF-1.4
+%Ç쏢
+1 0 obj << /Type /Catalog /ViewerPreferences << /NonFullScreenPageMode /UseNone >> /PageLayout /SinglePage /Pages 2 0 R /PageMode /UseNone >> endobj
+2 0 obj << /Type /Pages /Kids [ 5 0 R ] /Resources 3 0 R /Count 1 /MediaBox [ 0 0 595 842 ] >> endobj
+3 0 obj << /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> endobj
+4 0 obj << /Producer (PDF::API2 0.55 \(fix-3328 / 2006-08-14\) [linux]) >> endobj
+5 0 obj << /Type /Page /Contents [ 10 0 R 13 0 R 14 0 R 15 0 R ] /Parent 2 0 R /Resources << /Font << /HelvCBB~1167225976 6 0 R /TiRoCBC~1167225976 8 0 R /TiRoCBD~1167225976 11 0 R >> /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> >> endobj
+6 0 obj << /Type /Font /Subtype /Type1 /FirstChar 32 /Encoding << /Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences [ 0 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /bullet /Euro /bullet /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl /circumflex /perthousand /Scaron /guilsinglleft /OE /bullet /Zcaron /bullet /bullet /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash /tilde /trademark /scaron /guilsinglright /oe /bullet /zcaron /Ydieresis /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] >> /BaseFont /Helvetica /ToUnicode 7 0 R /LastChar 255 /Widths [ 278 278 355 556 556 889 667 191 333 333 389 584 278 333 278 278 556 556 556 556 556 556 556 556 556 556 278 278 584 584 584 556 1015 667 667 722 722 667 611 778 722 278 500 667 556 833 722 778 667 778 722 667 611 722 667 944 667 667 611 278 278 278 469 556 333 556 556 500 556 556 278 556 556 222 222 500 222 833 556 556 556 556 333 500 278 556 500 722 500 500 500 334 260 334 584 350 556 350 222 556 333 1000 556 556 333 1000 667 333 1000 350 611 350 350 222 222 333 333 350 556 1000 333 1000 500 333 944 350 500 667 278 333 556 556 556 556 260 556 333 737 370 556 584 333 737 333 400 584 333 333 333 556 537 278 333 333 365 556 834 834 834 611 667 667 667 667 667 667 1000 722 667 667 667 667 278 278 278 278 722 722 778 778 778 778 778 584 778 722 722 722 722 667 667 611 556 556 556 556 556 556 889 500 556 556 556 556 278 278 278 278 556 556 556 556 556 556 556 584 611 556 556 556 556 500 556 500 ] /Name /HelvCBB~1167225976 >> endobj
+7 0 obj << /Type /CMap /CIDSystemInfo << /Supplement 0 /Ordering (XYZ) /Registry (HelvCBB~1167225976) >> /CMapName /pdfapi2-HelvCBB~1167225976+0 /Length 1235 /Filter [ /FlateDecode ] >> stream
+xœe×Kk#G
á½~Eo&„`•ê&1tÝÈ,r!³I²óØí‰a,Ùd“ßž:ýŠI‘ìï¸T]~ºúsC½{7å·—×ç§Í»ž~¸=õº¹Êʇããëtõóùùîãò:=<
ïÏËËóÛùn™>-Ÿ³›îï^ùŸwOýz]üñ¯—×åéÃñáyº¾ÞLÓtõKÿüåõü×ôþûåËŸ9¥¿	q·ó‡¾Ygüt¾_ΏÇÏÓû_û¡o§Ó—åi9¾NÛÍÍÍt¿<ôå;òÇÛ§eº:Ý?Üž
wßýÅo·ë\sa=ß//§Û»å|{ü¼l®·Û›éºµ›Ír¼ÿÏg;¸æÓÃÝ·çËÜmÿºéÙy7d;d7d?ä0ä8äýCž‡œ†œ‡\†\‡ÜþÍfð›Áo¿üfð›Áo¿üfð›Áo¿üfð›Áo¿ü;ü»5ãï¥gü½ôŒ¿—žñ÷Ò3þ^zÆßKÏø{é/=ãï¥gü½ôŒ¿—žñ÷Ò3þ^zÆßKÏø{Ù\[üV~‹ßÊoñ[ù-~+¿Åoå·ø­ü¿•ßâ·ò[üV~‹ßÊoñ[ù-~+¿Åoå·ø­ü¿•ßâ·ò;üN~‡ßÉïð;ù
~'¿Ãïäwøü¿“ßáwò;üN~‡ßÉïð;ù
~'¿Ãïäwøü¿“ßáwò{ü^~ßËïñ{ù=~/¿Çïå÷ø½ü
¿—ßã÷ò{ü^~ßËïñ{ù=~/¿Çïå÷ø½ü
¿—ßã÷òüAþ€?Èðùþ Àäøƒü?àòüAþ€?Èðùþ Àäøƒü?àòGüQþˆ?ÊñGù#þ(Äåø£ü”?âòGüQþˆ?ÊñGù#þ(Äåø£ü”?Ê¿ãݲ߮yÖü½Æwk6Z¿úÍa
wŒk½g¾Ìû@Ö>ì#Yû°_ý»¼Î9¬ãë»b¿úÍúÜ÷‰qÝ×~õ›µo÷eð¬~³ÞË~ð¶CÆo´W‡‹_k
,Y÷x¸øµÎÁ×â7zFüFÏ耿¬×®~Ãü‹_÷x¸øµW‡‹]gð.~íÛ¡‘圇÷ÿLÿÌZs¦f];Ó?³ÖœéŸY¶™þ™Õ?3ý3kŸgúgVÿÌôϼþ-úgÖžÌôÏ,óLÿÌꟙþYûa
Þÿ3ý3Ë?Óÿ³ú?áOò'üIþ„?ÉŸð'ùþ$ŸäOø“ü	’?áOò'üIþ„?ÉŸð'ùþ$ŸäOø“ü	’?ãÏògüYþŒ?ËŸñgù3þ,ÆŸåÏø×>Ïø³ü–?ãÏògüYþŒ?ËŸñgù3þ,ÆŸåÏø³ü‘¿à/òüEþ‚¿È_ðùþ"Á_ä/ø‹ü‘¿à/òüEþ‚¿È_ð¯ÿ/‘¿à/òüEþŠ¿Ê_ñWù+þ*Å_å¯ø«ü•¿â¯òWüUþŠ¿Ê_ñWù+þ*Å_å¯ø«ü•¿â¯òWüUþ†¿Éßð7ùþ&Ãßäoø›ü
“¿áoò7üMþ†¿Éßð7ùþ&Ãßäoø›ü
“¿áoò7ü—Âå$ ³B?ÞL_woçsÔh=“èÄñx\¾ž’Nϧ©®ïÍ?u֐
+endstream endobj
+8 0 obj << /Type /Font /Subtype /Type1 /FirstChar 32 /Encoding << /Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences [ 0 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /Euro /bullet /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl /circumflex /perthousand /Scaron /guilsinglleft /OE /bullet /Zcaron /bullet /bullet /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash /tilde /trademark /scaron /guilsinglright /oe /bullet /zcaron /Ydieresis /space /exclamdown /cent /sterling /fraction /yen /florin /section /currency /quotesingle /quotedblleft /guillemotleft /guilsinglleft /guilsinglright /fi /fl /degree /endash /dagger /daggerdbl /periodcentered /mu /paragraph /bullet /quotesinglbase /quotedblbase /quotedblright /guillemotright /ellipsis /perthousand /threequarters /questiondown /Agrave /grave /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /Eacute /ring /cedilla /Igrave /hungarumlaut /ogonek /caron /emdash /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /AE /acircumflex /ordfeminine /adieresis /aring /ae /ccedilla /Lslash /Oslash /OE /ordmasculine /igrave /iacute /icircumflex /idieresis /eth /ae /ograve /oacute /ocircumflex /dotlessi /odieresis /divide /lslash /oslash /oe /germandbls /udieresis /yacute /thorn /ydieresis ] >> /BaseFont /Times-Roman /ToUnicode 9 0 R /LastChar 255 /Widths [ 250 333 408 500 500 833 778 333 333 333 500 564 250 333 250 278 500 500 500 500 500 500 500 500 500 500 278 278 564 564 564 444 921 722 667 667 722 611 556 722 722 333 389 722 611 889 722 722 556 722 667 556 611 722 722 944 722 722 611 333 278 333 469 500 333 444 500 444 500 444 333 500 500 278 278 500 278 778 500 500 500 500 333 389 278 500 500 722 500 500 444 480 200 480 541 250 500 350 333 500 444 1000 500 500 333 1000 556 333 889 350 611 350 350 333 333 444 444 350 500 1000 333 980 389 333 722 350 444 722 250 333 500 500 167 500 500 500 500 180 444 500 333 333 556 556 400 500 500 500 250 500 453 350 333 444 444 500 1000 1000 750 444 722 333 333 333 333 333 333 333 333 611 333 333 333 333 333 333 1000 722 722 722 722 722 722 564 722 722 722 722 722 722 556 500 444 889 444 276 444 444 667 444 611 722 889 310 278 278 278 278 500 667 500 500 500 278 500 564 278 500 722 500 500 500 500 500 ] /Name /TiRoCBC~1167225976 >> endobj
+9 0 obj << /Type /CMap /CIDSystemInfo << /Supplement 0 /Ordering (XYZ) /Registry (TiRoCBC~1167225976) >> /CMapName /pdfapi2-TiRoCBC~1167225976+0 /Length 1262 /Filter [ /FlateDecode ] >> stream
+xœe×Koã6à½
6¦(Š˜âK‚ ¤HYôImw
[I
4¶á8‹Ùô·—ç
aDLÈðD¦˜W7œÑÝ]7}¼ßÎo›»š~Þ]긹ŸžÒÓéxë÷Ïó­{9ž×ùýüqÝÏÝ—ùõxÚ¨¾;
÷7~Ç¿÷oõ~Üüüõý6¿=^ÎÝÃæëºûÏõó÷Ûõk÷é÷ãçó§•r¾ïíèÝ2ã×ëa¾
O¯Ý§?þü‹—ž?.—æ·ùt붛ÇÇî0¿Ôå+ò—ÝÛÜÝ_/»Ë±ÿéÿ+þ¸•¹jaóûe·Ÿ¯»Óë¼yØn»‡R
7óéðÝg½u¼çËËþïÝu™»­
kVM›lšl›ìšì›<4ylrhrlòÔäÔäÜä²fÕøUãW_5~ÕøUãW_5~ÕøUãW_5~ÕøUãW_5þžþ^2ýu¨™þ:ÔL
j¦¿5Ó_‡šé¯CÍð÷ÛÊ­™þ:ÔL/×é¯CÍôסfúëP3ýu¨™þ:ÔL
6š~
¿¦_ïé×ðkú5üš~
¿¦_ïé×ðkÖ¿5Ó¯á×ôkø5ý~M¿†_Ó¯á×ôkø5ý~M¿†ßÐoà7ôø
ý~C¿ßÐoà7ôø
ý~C¿ßÐoà7ôø
ý~C¿ßÐoà7ôø
ý~C¿ßÒoá·ô[ø-ý~K¿
ßÒoá·ô[ø-ý~K¿
ßÒoá·ô[ø-ý~K¿
ßÒoá·ô[ø-ý~K¿
ßmÙ«XßÑïàwô;ø
ý~G¿ƒßÑïàwô;ø
ý~G¿“õéwð;ú
üŽ~¿£ßÁïèwð;ú
üŽ~¿gý=êïé÷ð{ú=üž~¿§ßÃïé÷ð{ú=üž~¿§ßÃïé÷ð{ú=üž~¿§ßÃïé÷ð{ú=ü¾9Ö?`þ $Ë™3ô|.X¿åºáu¬3X·yp̲&Ï9Çñ÷“Ì府ƒø•“
y
ûį¤o‡Ôxįd/CY¯Û&«µ—Æ~=GÍŒ=Ž‹댶¹—~
g4.ç'žÑH’{ů8ñcãâG­ÆÅ/ë4þqñ£nca†34ç`ÿ¬Ø?÷öOÀš~9û' ‚[ŸQ`ÿôO`ÿ™¿œÿr=¬5	쟀þ	Óú,BZ÷à/q+¶ÂŒŸéðGµÖ0ök?D½öCdÿG"ýþÈþè“è׺ÅaíÃ8®½Ãú
#ýþ8­=ÓÚo‘ýå^öÄïïDÿ„9ÓrþHfý#ê6鵇'³öôÔ_Öq¼Žg:yfÔpZê/×YÿI®ÎÁ¾¦Å/søû;Éú‰s°Ç)3cS¡5LÛµWý	uNô'Ô0±žKbý“̧?¡þ‰õOØcbÿ$YŸ~ÙW¢_ö•xþˆ?Ñ/¶D¿Ô'ñübýêŸXÿ„ºeÖ?£æ™~©s¦?ß—þÇÏÊôgø3ýþL–{éÏðgñ+ù7=ë^rXÏ™¼Ô_Ö§?ßéÏðgú3ü™þ¡¿À_Ôj(ô¬_è/¨¡¿À_įäÿK
þ"÷Ò_à/‹_Ö¡¿À_ÂzΔ¸Ö³Ð_à/ôøýþBÿò†°¼	à]¡¾Þtß^?ö×k½ˆW y'ÁÇñ4{Kºœ/]ý
_›ÿ ‚îÕ+
+endstream endobj
+10 0 obj << /Filter [ /FlateDecode ] /Length 71 >> stream
+xœSPp
+QPÐ÷HÍ)svrª3443722µ47S04QI#O&$3(ßÙÉEÆIÆ™=£¦š6jUMSpf} ©¹ÿÈ
+endstream endobj
+11 0 obj << /Type /Font /Subtype /Type1 /FirstChar 32 /Encoding << /Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences [ 0 /.notdef /acute /caron /circumflex /dieresis /grave /macron /ring /tilde /breve /ogonek /dotaccent /hungarumlaut /cedilla /dblgrave /controlSI /controlDLE /controlDC1 /controlDC2 /controlDC3 /controlDC4 /controlNAK /controlSYN /controlETB /controlCAN /controlEM /controlSUB /controlESC /controlFS /controlGS /dotlessi /dotlessj /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /controlDEL /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD /uniFFFD ] >> /BaseFont /Times-Roman /ToUnicode 12 0 R /LastChar 255 /Widths [ 250 333 408 500 500 833 778 180 333 333 500 564 250 333 250 278 500 500 500 500 500 500 500 500 500 500 278 278 564 564 564 444 921 722 667 667 722 611 556 722 722 333 389 722 611 889 722 722 556 722 667 556 611 722 722 944 722 722 611 333 278 333 469 500 333 444 500 444 500 444 333 500 500 278 278 500 278 778 500 500 500 500 333 389 278 500 500 722 500 500 444 480 200 480 541 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 ] /Name /TiRoCBD~1167225976 >> endobj
+12 0 obj << /Type /CMap /CIDSystemInfo << /Supplement 0 /Ordering (XYZ) /Registry (TiRoCBD~1167225976) >> /CMapName /pdfapi2-TiRoCBD~1167225976+0 /Length 1038 /Filter [ /FlateDecode ] >> stream
+xœe×K‹ãF
á½
6
Bh×ÝcªTЋ\˜Îb&;-wñÙ½˜M~{tú43‡‰ÁÖkU•x¼2ßÃC“_o÷Ëiñ0ׯÛë|]<æ§òt>Þ›Ç?¦Ëîy¼7‡ãy?·Ëë´›/ãËñ¼0¶Ùww~ãçî4ŸÇá篷ûxz:.Íz½hšæñã¼~»O_›
?^r_þ5&&kC›âOo;~Ÿöãt<¿4>}þ‹·ž_¯×ÆÓx¾7ËÅfÓìÇÃüøùÛö46×ýa{=Ú_þÿÄŸ—o{Í;ë²o×ínœ¶ç—q±^.7ͺÖÍb<ïX³!òÌ—Ãîïíô¾w9¿6s¶A[¶E;¶C{¶Gv at GvD'vB¯Ø+tËnÑ
»C÷ì
Ù]Ø=°teÏ¿pmè7ðú
ü†~¿¡ßÀoè7ðú
ü†~¿¡ßÀoè7ðú
ü†~¿¡ßÀoè7ðú
ü†~¿¡ßÀoé·ð[ú-ü–~¿¥ßÂoé·ð[ú-ü–~¿¥ßÂoé·ð[ú-ü–~¿¥ßÂoé·ð[ú-ü–~¿¥ßÂïèwð;ú
üŽ~¿£ßÁïèwð;ú
üŽ~¿£ßÁïèwð;ú
üŽ~¿£ßÁïèwð;ú
üŽ~¿£ßÁïé÷ð{ú=üž~¿§ßÃïé÷ð{ú=üž~¿§ßÃïé÷ð{ú=üž~¿§ßÃïé÷ð{ú=üž~¿§ßÃèðúüþ  ?Àèðúüþ  ?Àèðúüþ  ?Àèðúüþ  ?ÀéðGú#ü‘þ¤?ÂéðGú#ü‘þ¤?ÂéðGú#ü‘þ¤?ÂéðGú#ü‘þ¤?ŸèOð'úü‰þ¢?ÁŸèOð'úü‰þ¢?ÁŸèOð'úü‰þ¢?ÁŸèOð'úü‰þ¢?Á¿âEÅž•‘¶ÒNÚKé(¤WÒ­t'ÝKgé"=H×ïÝŠ¿+þVü­ø[ñ·âoÅߊ¿+þVü­ø[ñ·âoÅ߉¿'þNüø;ñwâïÄ߉¿'þNüø;ñwâïÄß‹¿/þ^ü½ø{ñ÷âïÅß‹¿/þ^ü½ø{ñ÷âïÅŸÅŸÅŸÅŸÅŸÅŸÅŸÅŸÅŸÅŸÅŸÅŸÅŸÅŸÅŸÅŸÅ_Ä_Ä_Ä_Ä_Ä_Ä_Ä_Ä_Ä_Ä_Ä_Ä_Ä_Ä_Ä_Ä?ˆÿ þAüƒøñâÄ?ˆÿ þAüƒøñâÄ_Å_Å_Å_Å_Å_Å_Å_Å_Å_Å_Å_Å_Å_Å_Å_¿ûç	á}À¬07Í·ñc÷:MóMŒ@o3	&Žãyü6%]/×f^Ç{ñ˜\ö

+endstream endobj
+13 0 obj << /Filter [ /FlateDecode ] /Length 299 >> stream
+xœ•AŽÃ E¯Â	"†Ítßû/aJÒ6ŽÉÆŠøù/OH¸Ž™
"m%;Ìîùã`+„È©Iÿχûu˜ÚfÉùÄDeŽ‚ß Œ>¿Væ„‘&c€–iÏ‚Cgl9}
Vš
=€íÙ+Sœ•åÓ÷Þi‘ÜàØs‘
+xíJ–Ù×—Nïk8³3¬C&†XD`I/Œ ;cMw•AÖëðŽ±æãžÓ1¶¾Æ¨ë«Œ‘Ò‘ñû
FÉY{ßÂxé1b:
/GÉ
ÎœŽÓzô
)ŸU
%gaì}ã¥GŠ6’31FƒGoô荌þ¾ÇPl
%gaì}÷<ÎÇkCåQr‡kCÇØú–kãÚ#e›GÊ6”ï{Ä£Î#ñÄø½ïFs®Ü
+endstream endobj
+14 0 obj << /Filter [ /FlateDecode ] /Length 769 >> stream
+xœµVËnÛ0ü•=¶@ ˆ"©Ç±N¤EÑCê[Ñm1=½ŠúÐo/e›¢¤X
+¥È2`Ðbv83à.Àj
p½éÍêöB®ç84ð\@¬ÁÛ"výÈ×l×÷<ªnV«N%©+Q]+ÿ)Ïó`
Ã/øtÏYȳÏðÖßf`á€Xvï!ý3Œ`Ú[ó¼8¡¡Ã¯†T¢}>œ |O3
ƒxÉËÂ4J³Q;"ÞsµPõ6MøÒP¤ð×’_Á#+·bSæPñ¨-@àÛ8èôa®húlÓ$—ø¬€×RäW
溜(½
+‘lEX&EÍBrâ‘È-ÍfŠ€Ž¢ð£Œ"\¶Ór
÷HÔÅHà;^œùnÓÓ÷ƒX¬yÞ–º>•²îs¦ÔGÆ¥n`\J½v©5¿±°Pßò‚–‚Ý°Œ´w°cI©´œ=¶0Î
cb9NKívmÉ[9˜Çæ$?y(“0Â†µÌÞKU~–å`¹i.TùùlˆÂš®B

+¬ø²‡üo›2Ú±L$ÓӁ¶¨ÛB2±ýFd,†Û»Ÿ_û¶úÔ">¸ŽÒw—f‰xíW2u\¤då{ñ<ÛrMoÏŠ´bñüI<
ˆÝ0™¼a7¬ê“S
š\(‘€°rÐV†'i%dÿÍ²Žútaë4¢©uÔÃÖQ-a¦g`föŽu-rïZGI°ŒuõÉÁ¡ûÛÎu5R][
§¸K‚ƒMÓ
+Št/à%q{AšjGƒ—°SöògµÅèל$br¢‹íLùlÕyl2kÇ
H£šî@Sk-?ÄWb½·ü˜+G<EÁ`ù!ͲV/?G)fl
ر-9Auë¾¼³ՐÇñ]Ë3wr‰LiÔeJ70Ë”sL¡	™ÂÁ¢™BËg
+-—)ÜìjžÐŽ,éFìNèãô
W}n¼N<¹ûfúŽ8LÑN7]fÀi<ã§Oò¡‡1¾Àe¤Q/téF—vÁewk øöŒŒØ
+endstream endobj
+15 0 obj << /Filter [ /FlateDecode ] /Length 135 >> stream
+xœMл
C1FáU˜à
+lðc‚ôÉi’&M֏m~PäæøC¢€˜ö»ßHèKÆÔg¡7™Ú©×¡®A«œ4IAÍ‚v91­:dÚ@»œ$I@:‚v9Y’•¤ª3h—SA«œ4Iƒ$I@¸C¤é5Ÿh-WLðÁœñ³üó¤ý VM

+endstream endobj
+xref
+0 16
+0000000000 65535 f 
+0000000015 00000 n 
+0000000164 00000 n 
+0000000266 00000 n 
+0000000335 00000 n 
+0000000417 00000 n 
+0000000662 00000 n 
+0000003870 00000 n 
+0000005316 00000 n 
+0000008507 00000 n 
+0000009980 00000 n 
+0000010127 00000 n 
+0000013281 00000 n 
+0000014531 00000 n 
+0000014907 00000 n 
+0000015753 00000 n 
+trailer
+<< /Root 1 0 R /Size 16 /Info 4 0 R >>
+startxref
+15965
+%%EOF

Modified: packages/libpdf-table-perl/branches/upstream/current/lib/PDF/Table.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpdf-table-perl/branches/upstream/current/lib/PDF/Table.pm?rev=4906&op=diff
==============================================================================
--- packages/libpdf-table-perl/branches/upstream/current/lib/PDF/Table.pm (original)
+++ packages/libpdf-table-perl/branches/upstream/current/lib/PDF/Table.pm Wed Feb 28 21:11:25 2007
@@ -3,7 +3,7 @@
 use 5.006;
 use strict;
 use warnings;
-our $VERSION = '0.9.2';
+our $VERSION = '0.9.3';
 
 
 ############################################################
@@ -43,6 +43,18 @@
 		( undef , undef, undef, undef , undef , undef      , undef     , undef , undef , undef  );
     my @line 		= ();		# Temp data array with words on one line 
     my %width 		= ();		# The width of every unique word in the givven text
+
+	# Try to provide backward compatibility
+	foreach my $key (keys %arg)
+	{
+		my $newkey = $key;
+		if($newkey =~ s#^-##)
+		{
+			$arg{$newkey} = $arg{$key};
+			delete $arg{$key};
+		}
+	}
+	#####
 
 	#---
 	# Lets check mandatory parameters with no default values
@@ -85,6 +97,7 @@
 	# Little Init
 	$xpos = $xbase;
 	$ypos = $ybase;
+	$ypos = $ybase + $line_space;
 	my $bottom_border = $ybase - $height; 
     # While we can add another line
     while ( $ypos >= $bottom_border + $line_space ) 
@@ -99,10 +112,8 @@
 
 	    	$ypos -= $arg{'parspace'} if $arg{'parspace'};
 	    	last unless $ypos >= $bottom_border;
-	    	$first_line = 1;
-	    	$first_paragraph = 0;
 		}
-		$ypos -= $line_space unless($first_line);
+		$ypos -= $line_space;
 		$xpos = $xbase;
 
 		# While there's room on the line, add another word
@@ -209,6 +220,18 @@
 		print "Error: Mandatory parameter is missing pdf/page/data object!\n";
 		return;
 	}
+	# Try to provide backward compatibility
+	foreach my $key (keys %arg)
+	{
+		my $newkey = $key;
+		if($newkey =~ s#^-##)
+		{
+			$arg{$newkey} = $arg{$key};
+			delete $arg{$key};
+		}
+	}
+	#TODO: Add code for header props compatibility and col_props comp....
+	#####
 	my ( $xbase, $ybase, $width, $height ) = ( undef, undef, undef, undef );
 	# Could be 'int' or 'real' values
 	$xbase 	= $arg{'x'		} || -1;	
@@ -279,6 +302,8 @@
 
 	my $pg_cnt 		= 1;
 	my $cur_y 		= $ybase;
+	my $cell_props	= $arg{cell_props} || [];   # per cell properties
+	my $row_cnt		= ( ref $header_props and $header_props->{'repeat'} ) ?  1 : 0; # current row in user data
 
 	#If there is valid data array reference use it!
 	if(ref $data eq 'ARRAY')
@@ -480,6 +505,10 @@
                     {   
 						$txt->fillcolor( $header_props->{'font_color'} ); 
 					}	
+					elsif( $cell_props->[$row_cnt][$j]{font_color} )
+					{
+						$txt->fillcolor( $cell_props->[$row_cnt][$j]{font_color} );
+					}
 					elsif( $col_props->[$j]->{'font_color'} )
 					{ 
 						$txt->fillcolor( $col_props->[$j]->{'font_color'} ); 
@@ -519,7 +548,7 @@
 					#TODO: Implement Center text align
 					$col_props->[$j]->{justify} = $col_props->[$j]->{justify} || 'left';
 					# If the content is wider than the specified width, we need to add the text as a text block
-					if($record_widths->[$j] and ($record_widths->[$j] < $calc_column_widths->[$j]))
+					if($record->[$j] !~ m#(.\n.)# and  $record_widths->[$j] and ($record_widths->[$j] < $calc_column_widths->[$j]))
 					{
 						my $space = $pad_left;
 						if($col_props->[$j]->{justify} eq 'right')
@@ -562,31 +591,37 @@
 				# Draw cell bgcolor
 				# This has to be separately from the text loop 
 				#  because we do not know the final height of the cell until all text has been drawn
-				if($background_color)
+				$cur_x = $xbase;
+				for(my $j =0;$j < scalar(@$record);$j++)
 				{
-					$cur_x = $xbase;
-					for(my $j =0;$j < scalar(@$record);$j++)
+					if ( 	$cell_props->[$row_cnt][$j]->{'background_color'} || 
+							$col_props->[$j]->{'background_color'} || 
+							$background_color ) 
 					{
 						$gfx_bg->rect( $cur_x, $cur_y-$row_h, $calc_column_widths->[$j], $row_h);
-						if( $col_props->[$j]->{'background_color'} and !$first_row)
+						if ( $cell_props->[$row_cnt][$j]->{'background_color'} && !$first_row )
 						{
-							$gfx_bg->fillcolor($col_props->[$j]->{'background_color'});
+						    $gfx_bg->fillcolor($cell_props->[$row_cnt][$j]->{'background_color'});
+						}
+						elsif( $col_props->[$j]->{'background_color'} && !$first_row  )
+						{
+						    $gfx_bg->fillcolor($col_props->[$j]->{'background_color'});
 						}
 						else
 						{
-							$gfx_bg->fillcolor($background_color);
+						    $gfx_bg->fillcolor($background_color);
 						}
-
 						$gfx_bg->fill();
-						$cur_x += $calc_column_widths->[$j];
-					}#End of for(my $j....
-				}#End of if($background_color)
+					}
+					$cur_x += $calc_column_widths->[$j];
+				}#End of for(my $j....
 
 				$cur_y -= $row_h;
 				$row_h  = $min_row_h;
 				$gfx->move(  $xbase , $cur_y );
 				$gfx->hline( $xbase + $width );
 				$rows_counter++;
+				$row_cnt++ unless ( $first_row );
 				$first_row = 0;
 			}# End of while(scalar(@{$data}) and $cur_y-$row_h > $bot_marg)
 
@@ -786,6 +821,7 @@
      new_page_func  => $code_ref,  # see section TABLE SPANNING
      header_props   => $hdr_props, # see section HEADER ROW PROPERTIES
      column_props   => $col_props, # see section COLUMN PROPERTIES
+     cell_props     => $row_props, # see section CELL PROPERTIES
  )
 
 =back
@@ -848,6 +884,47 @@
 
 =over
 
+=item CELL PROPERTIES
+
+If the 'cell_props' parameter is used, it should be an arrayref with arrays of hashrefs
+(of the same dimension as the data array) with one hashref for each cell of the table.
+Each hashref can contain any of keys shown here:
+
+=back
+
+  $cell_props = [
+    [ #This array is for the first row. If header_props is defined it will overwrite this settings.
+      {#Row 1 cell 1
+        background_color => '#AAAA00',
+        font_color       => 'blue',
+      },
+      # etc.
+    ],
+    [ #Row 2
+      {#Row 2 cell 1
+        background_color => '#CCCC00',
+        font_color       => 'blue',
+      },
+      {#Row 2 cell 2
+        background_color => '#CCCC00',
+        font_color       => 'blue',
+      },
+      # etc.
+    ],
+	# etc.
+  ];
+
+=over
+
+In case of a conflict between column, odd/even and cell formating, cell formating will overwrite the other two.
+In case of a conflict between header row cell formating, header formating will win.
+
+=back
+
+=over
+
+
+
 =item TABLE SPANNING    
 
 If used the parameter 'new_page_func' must be a function reference which when executed will create a new page and will return the object back to the module.
@@ -882,7 +959,7 @@
 
 =over
 
- ($width_of_last_line, $ypos_of_last_line, $left_over_text) = text_block(
+ ($width_of_last_line, $ypos_of_last_line, $left_over_text) = $pdftable->text_block(
     $txt,
     $text_to_place,
     #X,Y - coordinates of upper left corner
@@ -918,7 +995,7 @@
 
 =head1 VERSION
 
-0.9.2
+0.9.3
 
 =head1 COPYRIGHT AND LICENSE
 




More information about the Pkg-perl-cvs-commits mailing list