r38207 - in /trunk/libpdf-report-perl: ./ debian/ examples/ lib/PDF/

nhandler-guest at users.alioth.debian.org nhandler-guest at users.alioth.debian.org
Thu Jun 18 04:35:20 UTC 2009


Author: nhandler-guest
Date: Thu Jun 18 04:35:14 2009
New Revision: 38207

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=38207
Log:
* New upstream release
* debian/control:
  - Bump Standards-Version to 3.8.2 (No changes)

Added:
    trunk/libpdf-report-perl/examples/openpdf.pl
      - copied unchanged from r38205, branches/upstream/libpdf-report-perl/current/examples/openpdf.pl
Modified:
    trunk/libpdf-report-perl/Changes
    trunk/libpdf-report-perl/MANIFEST
    trunk/libpdf-report-perl/META.yml
    trunk/libpdf-report-perl/Makefile.PL
    trunk/libpdf-report-perl/README
    trunk/libpdf-report-perl/debian/changelog
    trunk/libpdf-report-perl/debian/control
    trunk/libpdf-report-perl/examples/barcode.pl
    trunk/libpdf-report-perl/examples/footer.pl
    trunk/libpdf-report-perl/examples/image.pl
    trunk/libpdf-report-perl/examples/paragraph.pl
    trunk/libpdf-report-perl/examples/piegraph.pl
    trunk/libpdf-report-perl/examples/rotate.pl
    trunk/libpdf-report-perl/lib/PDF/Report.pm

Modified: trunk/libpdf-report-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpdf-report-perl/Changes?rev=38207&op=diff
==============================================================================
--- trunk/libpdf-report-perl/Changes (original)
+++ trunk/libpdf-report-perl/Changes Thu Jun 18 04:35:14 2009
@@ -1,4 +1,9 @@
 Revision history for Perl extension PDF::Report.
+
+1.33  Wed Jun 17 09:38:16 EDT 2009
+  - Applied patch to make meta-info an instance variable and retrievable -
+    submitted by Sean Robinson
+  - Added examples/openpdf.pl (missing from the last version)
 
 1.32  Tue Jun  9 11:47:16 EDT 2009
   - Removed Test::Pod::Coverage from test.

Modified: trunk/libpdf-report-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpdf-report-perl/MANIFEST?rev=38207&op=diff
==============================================================================
--- trunk/libpdf-report-perl/MANIFEST (original)
+++ trunk/libpdf-report-perl/MANIFEST Thu Jun 18 04:35:14 2009
@@ -13,6 +13,7 @@
 examples/image.png
 examples/image.pnm
 examples/image.tif
+examples/openpdf.pl
 examples/paragraph.pl
 examples/piegraph.pl
 examples/rotate.pl

Modified: trunk/libpdf-report-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpdf-report-perl/META.yml?rev=38207&op=diff
==============================================================================
--- trunk/libpdf-report-perl/META.yml (original)
+++ trunk/libpdf-report-perl/META.yml Thu Jun 18 04:35:14 2009
@@ -1,14 +1,12 @@
 --- #YAML:1.0
 name:               PDF-Report
-version:            1.32
+version:            1.33
 abstract:           A wrapper written for PDF::API2
 author:
     - Andy Orr <aorr_at_cpan_dot_org>
 license:            unknown
 distribution_type:  module
 configure_requires:
-    ExtUtils::MakeMaker:  0
-build_requires:
     ExtUtils::MakeMaker:  0
 requires:
     PDF::API2:   0
@@ -17,7 +15,7 @@
     directory:
         - t
         - inc
-generated_by:       ExtUtils::MakeMaker version 6.52
+generated_by:       ExtUtils::MakeMaker version 6.46
 meta-spec:
     url:      http://module-build.sourceforge.net/META-spec-v1.4.html
     version:  1.4

Modified: trunk/libpdf-report-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpdf-report-perl/Makefile.PL?rev=38207&op=diff
==============================================================================
--- trunk/libpdf-report-perl/Makefile.PL (original)
+++ trunk/libpdf-report-perl/Makefile.PL Thu Jun 18 04:35:14 2009
@@ -1,17 +1,17 @@
-use strict;
-use warnings;
-use ExtUtils::MakeMaker;
-
-WriteMakefile(
-    NAME                => 'PDF::Report',
-    AUTHOR              => 'Andy Orr <aorr_at_cpan_dot_org>',
-    VERSION_FROM        => 'lib/PDF/Report.pm',
-    ABSTRACT_FROM       => 'lib/PDF/Report.pm',
-    PL_FILES            => {},
-    PREREQ_PM => {
-        'PDF::API2' => 0,
-        'Test::More' => 0,
-    },
-    dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
-    clean               => { FILES => 'PDF-Report-*' },
-);
+use strict;
+use warnings;
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+    NAME                => 'PDF::Report',
+    AUTHOR              => 'Andy Orr <aorr_at_cpan_dot_org>',
+    VERSION_FROM        => 'lib/PDF/Report.pm',
+    ABSTRACT_FROM       => 'lib/PDF/Report.pm',
+    PL_FILES            => {},
+    PREREQ_PM => {
+        'PDF::API2' => 0,
+        'Test::More' => 0,
+    },
+    dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+    clean               => { FILES => 'PDF-Report-*' },
+);

Modified: trunk/libpdf-report-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpdf-report-perl/README?rev=38207&op=diff
==============================================================================
--- trunk/libpdf-report-perl/README (original)
+++ trunk/libpdf-report-perl/README Thu Jun 18 04:35:14 2009
@@ -1,4 +1,4 @@
-Dist version 1.32
+Dist version 1.33
 ==================
 
 PDF::Report is written around Alfred Reibenschuh's PDF::API2.  It provides

Modified: trunk/libpdf-report-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpdf-report-perl/debian/changelog?rev=38207&op=diff
==============================================================================
--- trunk/libpdf-report-perl/debian/changelog (original)
+++ trunk/libpdf-report-perl/debian/changelog Thu Jun 18 04:35:14 2009
@@ -1,3 +1,11 @@
+libpdf-report-perl (1.33-1) UNRELEASED; urgency=low
+
+  * New upstream release
+  * debian/control:
+    - Bump Standards-Version to 3.8.2 (No changes)
+
+ -- Nathan Handler <nhandler at ubuntu.com>  Thu, 18 Jun 2009 04:32:37 +0000
+
 libpdf-report-perl (1.32-1) unstable; urgency=low
 
   [ Nathan Handler ]

Modified: trunk/libpdf-report-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpdf-report-perl/debian/control?rev=38207&op=diff
==============================================================================
--- trunk/libpdf-report-perl/debian/control (original)
+++ trunk/libpdf-report-perl/debian/control Thu Jun 18 04:35:14 2009
@@ -9,7 +9,7 @@
  Niko Tyni <ntyni at iki.fi>, Russ Allbery <rra at debian.org>,
  gregor herrmann <gregoa at debian.org>,
  Nathan Handler <nhandler at ubuntu.com>
-Standards-Version: 3.8.1
+Standards-Version: 3.8.2
 Homepage: http://search.cpan.org/dist/PDF-Report/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libpdf-report-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libpdf-report-perl/

Modified: trunk/libpdf-report-perl/examples/barcode.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpdf-report-perl/examples/barcode.pl?rev=38207&op=diff
==============================================================================
--- trunk/libpdf-report-perl/examples/barcode.pl (original)
+++ trunk/libpdf-report-perl/examples/barcode.pl Thu Jun 18 04:35:14 2009
@@ -1,53 +1,53 @@
-use lib qw(../lib);
-use PDF::Report;
-
-my $pdf = new PDF::Report(
-                          PageSize => "letter",
-                          PageOrientation => "portrait",
-                          undef => undef
-                         );
-
-$pdf->newpage(1);
-$pdf->setFont('Helvetica-bold');
-$pdf->setSize(16);
-my ($width, $height) = $pdf->getPageDimensions();
-
-$pdf->centerString(0, $width, $height-40, "Barcodes");
-
-my $x = $width/3;
-my $y = $height-150; 
-my @types = qw(3of9 code128 ean13 codabar 2of5int);
-
-my @codes = qw(010203045678909 ABCDEFabcdef012345 010203045678909 
-               384318530034967067 384318530034967067);
-
-my @scale = qw(.9 .5 .75 1 .8);
-
-$pdf->setFont('Helvetica');
-$pdf->setSize(10);
-
-my $next_line = 120;
-
-foreach my $nbr (0 .. $#types) {
-  if ($y < 50) {
-   $pdf->newpage(1);
-   $y = $height - 80;
-  }
-  if (($types[$nbr] eq '3of9ext') or ($types[$nbr] eq '3of9extchk')) {
-    $ext = 90506;
-  } 
-  $pdf->centerString(0, $width, $y+85, $types[$nbr]);
-  $pdf->drawBarcode($x, $y, $scale[$nbr], 1,
-                   $types[$nbr], $codes[$nbr], $ext, 
-                   10, 10, 50, 10, ' ', undef, 8, undef);
-  $y-=$next_line;
-  $ext = "";
-}
-
-my $outpdf = $0;
-$outpdf =~ s/pl$/pdf/;
-open(PDF, "> $outpdf") or die "Error opening $outpdf: $!\n";
-print PDF $pdf->Finish();
-close(PDF);
-
-exit;
+use lib qw(../lib);
+use PDF::Report;
+
+my $pdf = new PDF::Report(
+                          PageSize => "letter",
+                          PageOrientation => "portrait",
+                          undef => undef
+                         );
+
+$pdf->newpage(1);
+$pdf->setFont('Helvetica-bold');
+$pdf->setSize(16);
+my ($width, $height) = $pdf->getPageDimensions();
+
+$pdf->centerString(0, $width, $height-40, "Barcodes");
+
+my $x = $width/3;
+my $y = $height-150; 
+my @types = qw(3of9 code128 ean13 codabar 2of5int);
+
+my @codes = qw(010203045678909 ABCDEFabcdef012345 010203045678909 
+               384318530034967067 384318530034967067);
+
+my @scale = qw(.9 .5 .75 1 .8);
+
+$pdf->setFont('Helvetica');
+$pdf->setSize(10);
+
+my $next_line = 120;
+
+foreach my $nbr (0 .. $#types) {
+  if ($y < 50) {
+   $pdf->newpage(1);
+   $y = $height - 80;
+  }
+  if (($types[$nbr] eq '3of9ext') or ($types[$nbr] eq '3of9extchk')) {
+    $ext = 90506;
+  } 
+  $pdf->centerString(0, $width, $y+85, $types[$nbr]);
+  $pdf->drawBarcode($x, $y, $scale[$nbr], 1,
+                   $types[$nbr], $codes[$nbr], $ext, 
+                   10, 10, 50, 10, ' ', undef, 8, undef);
+  $y-=$next_line;
+  $ext = "";
+}
+
+my $outpdf = $0;
+$outpdf =~ s/pl$/pdf/;
+open(PDF, "> $outpdf") or die "Error opening $outpdf: $!\n";
+print PDF $pdf->Finish();
+close(PDF);
+
+exit;

Modified: trunk/libpdf-report-perl/examples/footer.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpdf-report-perl/examples/footer.pl?rev=38207&op=diff
==============================================================================
--- trunk/libpdf-report-perl/examples/footer.pl (original)
+++ trunk/libpdf-report-perl/examples/footer.pl Thu Jun 18 04:35:14 2009
@@ -1,36 +1,36 @@
-use lib qw(../lib);
-use PDF::Report;
-
-my $pdf = new PDF::Report(
-                          PageSize => [5.5*72, 8.5*72], # Custom page size 
-                          PageOrientation => "portrait"
-                         );
-
-$pdf->setFont('Helvetica');
-$pdf->setSize(12);
-my ($width, $height) = $pdf->getPageDimensions();
-my $y1 = $height - 30;
-my $x1 = 30;
-
-for (1 .. 4) {
-  $pdf->newpage();
-}
-
-my $outpdf = $0;
-$outpdf =~ s/pl$/pdf/;
-open(PDF, "> $outpdf") or die "Error opening $outpdf: $!\n";
-print PDF $pdf->Finish(\&footer);
-close(PDF);
-
-exit;
-
-sub footer {
-  my $pages = $pdf->pages;
-
-  $pdf->setFont("Times-roman");
-  $pdf->setSize(8);
-  for (1 .. $pages) {
-    $pdf->openpage($_);
-    $pdf->centerString($x1, $width-30, 10, "$_ out of $pages pages");
-  }
-}
+use lib qw(../lib);
+use PDF::Report;
+
+my $pdf = new PDF::Report(
+                          PageSize => [5.5*72, 8.5*72], # Custom page size 
+                          PageOrientation => "portrait"
+                         );
+
+$pdf->setFont('Helvetica');
+$pdf->setSize(12);
+my ($width, $height) = $pdf->getPageDimensions();
+my $y1 = $height - 30;
+my $x1 = 30;
+
+for (1 .. 4) {
+  $pdf->newpage();
+}
+
+my $outpdf = $0;
+$outpdf =~ s/pl$/pdf/;
+open(PDF, "> $outpdf") or die "Error opening $outpdf: $!\n";
+print PDF $pdf->Finish(\&footer);
+close(PDF);
+
+exit;
+
+sub footer {
+  my $pages = $pdf->pages;
+
+  $pdf->setFont("Times-roman");
+  $pdf->setSize(8);
+  for (1 .. $pages) {
+    $pdf->openpage($_);
+    $pdf->centerString($x1, $width-30, 10, "$_ out of $pages pages");
+  }
+}

Modified: trunk/libpdf-report-perl/examples/image.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpdf-report-perl/examples/image.pl?rev=38207&op=diff
==============================================================================
--- trunk/libpdf-report-perl/examples/image.pl (original)
+++ trunk/libpdf-report-perl/examples/image.pl Thu Jun 18 04:35:14 2009
@@ -1,33 +1,33 @@
-use lib qw(../lib);
-use PDF::Report;
-
-my $pdf = new PDF::Report(
-                          PageSize => "LETTER", 
-                          PageOrientation => "portrait",
-                          undef => undef
-                         );
-
-$pdf->setFont('Helvetica');
-$pdf->setSize(12);
-my ($width, $height) = $pdf->getPageDimensions();
-my $y1 = $height - 30;
-my $x1 = 30;
-  
-$pdf->newpage();
-
-$y1-=70;
-
-foreach my $ext (qw(jpg gif tif png pnm)) {
-  $pdf->addImgScaled("image.$ext", 250, $y1, 1);
-  $y1-=70;
-}
-$y1-=70;
-$pdf->addImgScaled("image.jpg", 250, $y1, 2);
-
-my $outpdf = $0;
-$outpdf =~ s/pl$/pdf/;
-open(PDF, "> $outpdf") or die "Error opening $outpdf: $!\n";
-print PDF $pdf->Finish;
-close(PDF);
-
-exit;
+use lib qw(../lib);
+use PDF::Report;
+
+my $pdf = new PDF::Report(
+                          PageSize => "LETTER", 
+                          PageOrientation => "portrait",
+                          undef => undef
+                         );
+
+$pdf->setFont('Helvetica');
+$pdf->setSize(12);
+my ($width, $height) = $pdf->getPageDimensions();
+my $y1 = $height - 30;
+my $x1 = 30;
+  
+$pdf->newpage();
+
+$y1-=70;
+
+foreach my $ext (qw(jpg gif tif png pnm)) {
+  $pdf->addImgScaled("image.$ext", 250, $y1, 1);
+  $y1-=70;
+}
+$y1-=70;
+$pdf->addImgScaled("image.jpg", 250, $y1, 2);
+
+my $outpdf = $0;
+$outpdf =~ s/pl$/pdf/;
+open(PDF, "> $outpdf") or die "Error opening $outpdf: $!\n";
+print PDF $pdf->Finish;
+close(PDF);
+
+exit;

Modified: trunk/libpdf-report-perl/examples/paragraph.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpdf-report-perl/examples/paragraph.pl?rev=38207&op=diff
==============================================================================
--- trunk/libpdf-report-perl/examples/paragraph.pl (original)
+++ trunk/libpdf-report-perl/examples/paragraph.pl Thu Jun 18 04:35:14 2009
@@ -1,42 +1,42 @@
-use lib qw(../lib);
-use PDF::Report;
-
-my $pdf = new PDF::Report(
-                          PageSize => "letter",
-                          PageOrientation => "portrait",
-                          undef => undef
-                         );
-
-$pdf->newpage(1);
-$pdf->setFont('Helvetica-bold');
-$pdf->setSize(16);
-my ($width, $height) = $pdf->getPageDimensions();
-
-$pdf->centerString(0, $width, $height-40, "Paragraph");
-
-$pdf->setFont('Helvetica');
-$pdf->setSize(10);
-
-my $text1= 
-"A doctor, an architect, and a computer scientist were arguing about whose profession was the oldest.  In the course of their arguments, they got all the way back to the Garden of Eden, whereupon the doctor said, \"The medical profession is clearly the oldest, because Eve was made from Adam's rib, as the story goes, and that was a simply incredible surgical feat.\"";
-
-my $text2=
-        "The architect did not agree.  He said, \"But if you look at the Garden 
-itself, in the beginning there was chaos and void, and out of that the Garden 
-and the world were created.  So God must have been an architect.\"";
-
-my $text3=
-        "The computer scientist, who'd listened carefully to all of this, then 
-commented, \"Yes, but where do you think the chaos came from?\"";
-
-$pdf->addParagraph($text1, 30, $height-70, $width-60, 30, 25, 10);
-$pdf->addParagraph($text2, 30, $height-100, $width-60, 20, 25, 10);
-$pdf->addParagraph($text3, 30, $height-120, $width-60, 20, 25, 10);
-
-my $outpdf = $0;
-$outpdf =~ s/pl$/pdf/;
-open(PDF, "> $outpdf") or die "Error opening $outpdf: $!\n";
-print PDF $pdf->Finish();
-close(PDF);
- 
-exit;
+use lib qw(../lib);
+use PDF::Report;
+
+my $pdf = new PDF::Report(
+                          PageSize => "letter",
+                          PageOrientation => "portrait",
+                          undef => undef
+                         );
+
+$pdf->newpage(1);
+$pdf->setFont('Helvetica-bold');
+$pdf->setSize(16);
+my ($width, $height) = $pdf->getPageDimensions();
+
+$pdf->centerString(0, $width, $height-40, "Paragraph");
+
+$pdf->setFont('Helvetica');
+$pdf->setSize(10);
+
+my $text1= 
+"A doctor, an architect, and a computer scientist were arguing about whose profession was the oldest.  In the course of their arguments, they got all the way back to the Garden of Eden, whereupon the doctor said, \"The medical profession is clearly the oldest, because Eve was made from Adam's rib, as the story goes, and that was a simply incredible surgical feat.\"";
+
+my $text2=
+        "The architect did not agree.  He said, \"But if you look at the Garden 
+itself, in the beginning there was chaos and void, and out of that the Garden 
+and the world were created.  So God must have been an architect.\"";
+
+my $text3=
+        "The computer scientist, who'd listened carefully to all of this, then 
+commented, \"Yes, but where do you think the chaos came from?\"";
+
+$pdf->addParagraph($text1, 30, $height-70, $width-60, 30, 25, 10);
+$pdf->addParagraph($text2, 30, $height-100, $width-60, 20, 25, 10);
+$pdf->addParagraph($text3, 30, $height-120, $width-60, 20, 25, 10);
+
+my $outpdf = $0;
+$outpdf =~ s/pl$/pdf/;
+open(PDF, "> $outpdf") or die "Error opening $outpdf: $!\n";
+print PDF $pdf->Finish();
+close(PDF);
+ 
+exit;

Modified: trunk/libpdf-report-perl/examples/piegraph.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpdf-report-perl/examples/piegraph.pl?rev=38207&op=diff
==============================================================================
--- trunk/libpdf-report-perl/examples/piegraph.pl (original)
+++ trunk/libpdf-report-perl/examples/piegraph.pl Thu Jun 18 04:35:14 2009
@@ -1,30 +1,30 @@
-use lib qw(../lib);
-use PDF::Report;
-
-my $pdf = new PDF::Report(
-                          PageSize => "letter",
-                          PageOrientation => "portrait",
-                          undef => undef
-                         );
-
-$pdf->newpage(1);
-$pdf->setFont('Helvetica-bold');
-$pdf->setSize(16);
-my ($width, $height) = $pdf->getPageDimensions();
-
-$pdf->centerString(0, $width, $height-40, "Big Pie Graph");
-
-my @data = qw(2 4 3 2 3 5 2 4 2 3 4 5 3 4 3 5 4 2 4 3 4);
-my @labels;
-for (0 .. $#data) {
-  push(@labels, "label" . $_);  
-} 
-$pdf->drawPieGraph($width/2, $height-200, 100, \@data, \@labels);
-
-my $outpdf = $0;
-$outpdf =~ s/pl$/pdf/;
-open(PDF, "> $outpdf") or die "Error opening $outpdf: $!\n";
-print PDF $pdf->Finish();
-close(PDF);
- 
-exit;
+use lib qw(../lib);
+use PDF::Report;
+
+my $pdf = new PDF::Report(
+                          PageSize => "letter",
+                          PageOrientation => "portrait",
+                          undef => undef
+                         );
+
+$pdf->newpage(1);
+$pdf->setFont('Helvetica-bold');
+$pdf->setSize(16);
+my ($width, $height) = $pdf->getPageDimensions();
+
+$pdf->centerString(0, $width, $height-40, "Big Pie Graph");
+
+my @data = qw(2 4 3 2 3 5 2 4 2 3 4 5 3 4 3 5 4 2 4 3 4);
+my @labels;
+for (0 .. $#data) {
+  push(@labels, "label" . $_);  
+} 
+$pdf->drawPieGraph($width/2, $height-200, 100, \@data, \@labels);
+
+my $outpdf = $0;
+$outpdf =~ s/pl$/pdf/;
+open(PDF, "> $outpdf") or die "Error opening $outpdf: $!\n";
+print PDF $pdf->Finish();
+close(PDF);
+ 
+exit;

Modified: trunk/libpdf-report-perl/examples/rotate.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpdf-report-perl/examples/rotate.pl?rev=38207&op=diff
==============================================================================
--- trunk/libpdf-report-perl/examples/rotate.pl (original)
+++ trunk/libpdf-report-perl/examples/rotate.pl Thu Jun 18 04:35:14 2009
@@ -1,28 +1,28 @@
-use lib qw(../lib);
-use PDF::Report;
-
-my $pdf = new PDF::Report(
-                          PageSize => "LETTER", 
-                          PageOrientation => "portrait",
-                          undef => undef
-                         );
-
-$pdf->setFont('Helvetica');
-$pdf->setSize(12);
-my ($width, $height) = $pdf->getPageDimensions();
-my $y1 = $height - 30;
-my $x1 = 30;
-
-$pdf->newpage();
-
-# Add some text with rotate, and let's throw in some color for the fun of it
-$pdf->addRawText("This is some text of a different color, rotated.", 
-                 $x1+200, $y1-300, 'green', '', '', 315);
-
-my $outpdf = $0;
-$outpdf =~ s/pl$/pdf/;
-open(PDF, "> $outpdf") or die "Error opening $outpdf: $!\n";
-print PDF $pdf->Finish;
-close(PDF);
-
-exit;
+use lib qw(../lib);
+use PDF::Report;
+
+my $pdf = new PDF::Report(
+                          PageSize => "LETTER", 
+                          PageOrientation => "portrait",
+                          undef => undef
+                         );
+
+$pdf->setFont('Helvetica');
+$pdf->setSize(12);
+my ($width, $height) = $pdf->getPageDimensions();
+my $y1 = $height - 30;
+my $x1 = 30;
+
+$pdf->newpage();
+
+# Add some text with rotate, and let's throw in some color for the fun of it
+$pdf->addRawText("This is some text of a different color, rotated.", 
+                 $x1+200, $y1-300, 'green', '', '', 315);
+
+my $outpdf = $0;
+$outpdf =~ s/pl$/pdf/;
+open(PDF, "> $outpdf") or die "Error opening $outpdf: $!\n";
+print PDF $pdf->Finish;
+close(PDF);
+
+exit;

Modified: trunk/libpdf-report-perl/lib/PDF/Report.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpdf-report-perl/lib/PDF/Report.pm?rev=38207&op=diff
==============================================================================
--- trunk/libpdf-report-perl/lib/PDF/Report.pm (original)
+++ trunk/libpdf-report-perl/lib/PDF/Report.pm Thu Jun 18 04:35:14 2009
@@ -2,13 +2,13 @@
 # This is a wrapper for Alfred Reibenschuh's PDF::API2
 # Defines methods to create PDF reports
 # By: Andy Orr
-# Date: 06/09/2009
-# Version: 1.32
+# Date: 06/17/2009
+# Version: 1.33
 ###############################################################################
 
 package PDF::Report;
 
-$VERSION = "1.32"; 
+$VERSION = "1.33"; 
 
 =head1 PDF::Report 
 
@@ -43,16 +43,6 @@
 my $DATE=sprintf "%02d/%02d/%04d", ++$month, $day, 1900 + $year;
 
 # Document info
-my %INFO = 
-          (
-            Creator => "None",
-            Producer => "None",
-            CreationDate => $DATE,
-            Title => "Untitled",
-            Subject => "None",
-            Author => "Auto-generated",
-          );
-
 my @parameterlist=qw(
         PageSize
         PageWidth
@@ -151,6 +141,14 @@
               FtrFontSize  => 11,
               MARGIN_DEBUG => 0,
               PDF_API2_VERSION => $PDF::API2::VERSION,
+              INFO => {
+                Creator => "None",
+                Producer => "None",
+                CreationDate => $DATE,
+                Title => "Untitled",
+                Subject => "None",
+                Author => "Auto-generated",
+              },
 
               ########################################################
               # Cache for font object caching -- used by setFont() ###
@@ -1004,17 +1002,32 @@
   my ($self, %info) = @_;
 
   # Over-ride or define %INFO values
-  foreach my $key (keys %INFO) {
-    if (length($info{$key}) and ($info{$key} ne $INFO{$key})) {
-      $INFO{$key} = $info{$key};
+  foreach my $key (keys %{$self->{INFO}}) {
+    if (length($info{$key}) and ($info{$key} ne ${$self->{INFO}}{$key})) {
+      ${$self->{INFO}}{$key} = $info{$key};
     } 
   }
-  my @orig_keys = keys(%INFO);
+  my @orig_keys = keys(%{$self->{INFO}});
   foreach my $key (keys %info) {
     if (! grep /$key/, @orig_keys) {
-      $INFO{$key} = $info{$key};
+      ${$self->{INFO}}{$key} = $info{$key};
     }
   }
+}
+
+=item %infohash = $pdf->getInfo();
+
+Gets meta-data from the info structure of the document.
+Valid keys for %infohash: Creator, Producer, CreationDate,
+Title, Subject, Author, etc.
+
+=cut
+
+sub getInfo {
+  my $self = shift;
+
+  my %info = $self->{pdf}->info();
+  return %info;
 }
 
 =item $pdf->saveAs($fileName);
@@ -1035,7 +1048,7 @@
   my $self = shift;
   my $fileName = shift;
 
-  $self->{pdf}->info(%INFO);
+  $self->{pdf}->info(%{$self->{INFO}});
   $self->{pdf}->saveas($fileName);
   $self->{pdf}->end();
 }
@@ -1070,7 +1083,7 @@
     &gen_page_footer($self, $total, $callback);
   }
 
-  $self->{pdf}->info(%INFO);
+  $self->{pdf}->info(%{$self->{INFO}});
   my $out = $self->{pdf}->stringify;
 
   return $out;




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