--- libpdf-report-perl-1.30.orig/Report.pm +++ libpdf-report-perl-1.30/Report.pm @@ -67,6 +67,8 @@ =head1 METHODS +=over 4 + =item my $pdf = new PDF::Report(%opts); Creates a new pdf report object. @@ -270,30 +272,32 @@ } -=item PDF::API2 Removes all space between every word in the string you pass +=pod + +PDF::API2 Removes all space between every word in the string you pass and then rejoins each word with one space. If you want to use a string with more than one space between words for formatting purposes, you can either use the hack below or change PDF::API2 (that's what I did ;). The code below may or may not work according to what font you are using. I used 2 \xA0 per space because that worked for the Helvetica font I was using. -=item B +B -sub replaceSpace { - my $text = shift; - my $nbsp = "\xA0"; - my $new = ''; - my @words = split(/ /, $text); - foreach my $word (@words) { - if (length($word)) { - $new.=$word . ' '; - } else { - $new.=$nbsp . $nbsp; + sub replaceSpace { + my $text = shift; + my $nbsp = "\xA0"; + my $new = ''; + my @words = split(/ /, $text); + foreach my $word (@words) { + if (length($word)) { + $new.=$word . ' '; + } else { + $new.=$nbsp . $nbsp; + } + } + chop($new); + return $new; } - } - chop($new); - return $new; -} =cut @@ -918,7 +922,7 @@ $gfx->fillcolor('#ffffff'); $gfx->linewidth(0.1); $gfx->fill; - $gfx->formimage($bar,0,0); + $gfx->formimage($bar,0,0,$scale); $gfx->restore; } @@ -1070,6 +1074,10 @@ } ### END GLOBAL SUBS ########################################################### +=back + +=cut + ### PRIVATE SUBS ############################################################## sub gen_page_footer { my $self = shift; --- libpdf-report-perl-1.30.orig/examples/piegraph +++ libpdf-report-perl-1.30/examples/piegraph @@ -1,4 +1,5 @@ -require "../Report.pm"; +#!/usr/bin/perl +use PDF::Report; my $pdf = new PDF::Report( PageSize => letter, --- libpdf-report-perl-1.30.orig/examples/paragraph +++ libpdf-report-perl-1.30/examples/paragraph @@ -1,4 +1,5 @@ -require "../Report.pm"; +#!/usr/bin/perl +use PDF::Report; my $pdf = new PDF::Report( PageSize => letter, --- libpdf-report-perl-1.30.orig/examples/rotate +++ libpdf-report-perl-1.30/examples/rotate @@ -1,4 +1,5 @@ -require "../Report.pm"; +#!/usr/bin/perl +use PDF::Report; my $pdf = new PDF::Report( PageSize => LETTER, --- libpdf-report-perl-1.30.orig/examples/barcode +++ libpdf-report-perl-1.30/examples/barcode @@ -1,4 +1,5 @@ -require "../Report.pm"; +#!/usr/bin/perl +use PDF::Report; my $pdf = new PDF::Report( PageSize => letter, --- libpdf-report-perl-1.30.orig/examples/openpdf +++ libpdf-report-perl-1.30/examples/openpdf @@ -1,4 +1,5 @@ -require "../Report.pm"; +#!/usr/bin/perl +use PDF::Report; my $file = $ARGV[0]; print "Pass me a PDF file." if ! -e $file; --- libpdf-report-perl-1.30.orig/examples/footer +++ libpdf-report-perl-1.30/examples/footer @@ -1,4 +1,5 @@ -require "../Report.pm"; +#!/usr/bin/perl +use PDF::Report; my $pdf = new PDF::Report( PageSize => LETTER, --- libpdf-report-perl-1.30.orig/debian/changelog +++ libpdf-report-perl-1.30/debian/changelog @@ -0,0 +1,81 @@ +libpdf-report-perl (1.30-3) unstable; urgency=low + + * Scale barcodes correctly. Thanks, jim@short.circuit.com. + (Closes: #343937) + * Fix some POD errors in the PDF::Report documentation. + * Remove commented-out templates in debian/rules per ftp-master. + * Remove obsolete source and diff rules. + * Use debian/compat rather than DH_COMPAT per debhelper recommendation. + + -- Russ Allbery Mon, 16 Jan 2006 14:30:26 -0800 + +libpdf-report-perl (1.30-2) unstable; urgency=low + + [ Niko Tyni ] + * Fixed maintainer email address. + + [ Gunnar Wolf ] + * debian/watch was including modules in the same namespace, fixed. + * Now the clean target in debian/rules does not blindly go through the + realclean call + * Bumped up standards-version to 3.6.2 + + -- Gunnar Wolf Tue, 13 Dec 2005 21:58:13 -0600 + +libpdf-report-perl (1.30-1) unstable; urgency=low + + * New upstream release + + -- Gunnar Wolf Thu, 17 Mar 2005 18:49:54 -0600 + +libpdf-report-perl (1.22-2) unstable; urgency=low + + * Fixed usage of private (and deprecated) PDF::API2 attributes which + broke the whole thing. Applied patch by Jordan Hrycaj - Thanks! + (Closes: #292622) + + -- Gunnar Wolf Tue, 15 Feb 2005 20:36:48 -0600 + +libpdf-report-perl (1.22-1) unstable; urgency=low + + * New upstream version - Thanks to Allard Hoeve for + prompting for this upload + * Transferred maintenance to the Debian Perl Group + + -- Gunnar Wolf Thu, 27 Jan 2005 09:55:36 -0600 + +libpdf-report-perl (1.20-2) unstable; urgency=low + + * Fixed a missing build-dependency on libpdf-api2-perl (Closes: + #223176) + * Bumped up standards-version to 3.6.1 + + -- Gunnar Wolf Mon, 8 Dec 2003 16:13:02 -0600 + +libpdf-report-perl (1.20-1) unstable; urgency=low + + * New upstream release + * Added the upstream-provided examples to the documentation + * Switched build method to debhelper + + -- Gunnar Wolf Tue, 25 Nov 2003 15:38:32 -0600 + +libpdf-report-perl (1.10-2) unstable; urgency=low + + * Section change (interpreters -> perl) + + -- Gunnar Wolf Thu, 19 Jun 2003 13:43:12 -0500 + +libpdf-report-perl (1.10-1) unstable; urgency=low + + * New upstream release + + -- Gunnar Wolf Fri, 25 Apr 2003 11:30:26 -0500 + +libpdf-report-perl (1.00-1) unstable; urgency=low + + * Initial Release. + + -- Gunnar Eyal Wolf Iszaevich Mon, 10 Mar 2003 17:49:07 -0600 + --- libpdf-report-perl-1.30.orig/debian/control +++ libpdf-report-perl-1.30/debian/control @@ -0,0 +1,15 @@ +Source: libpdf-report-perl +Section: perl +Priority: optional +Build-Depends-Indep: debhelper (>= 4.0.0), perl (>= 5.8.0), libpdf-api2-perl (>=0.2.3.8) +Maintainer: Debian Perl Group +Uploaders: Gunnar Wolf , Allard Hoeve , Niko Tyni , Russ Allbery +Standards-Version: 3.6.2 + +Package: libpdf-report-perl +Architecture: all +Depends: perl (>= 5.8.0), libpdf-api2-perl (>=0.2.3.8), libtext-roman-perl (>=3.01) +Description: simplified PDF report generator + PDF::Report is written around Alfred Reibenschuh's PDF::API2. It + provides methods to create a PDF document with text, lines, color and + graphics --- libpdf-report-perl-1.30.orig/debian/dirs +++ libpdf-report-perl-1.30/debian/dirs @@ -0,0 +1,2 @@ +usr/share/perl5/PDF/Report +usr/share/doc/libpdf-report-perl --- libpdf-report-perl-1.30.orig/debian/compat +++ libpdf-report-perl-1.30/debian/compat @@ -0,0 +1 @@ +4 --- libpdf-report-perl-1.30.orig/debian/watch +++ libpdf-report-perl-1.30/debian/watch @@ -0,0 +1,6 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# Site Directory Pattern Version Script +version=2 +http://www.cpan.org/modules/by-module/PDF/PDF-Report-(\d.*)\.tar\.gz --- libpdf-report-perl-1.30.orig/debian/copyright +++ libpdf-report-perl-1.30/debian/copyright @@ -0,0 +1,11 @@ +This package was debianized by Gunnar Eyal Wolf Iszaevich on +Mon, 10 Mar 2003 17:49:07 -0600. + +It was downloaded from http://www.cpan.org/modules/by-module/PDF/ + +Upstream Author: Andrew Orr + +Copyright: + This Perl PDF::Report module is licensed under the Perl Artistic License. + On Debian GNU/Linux systems, the complete text of the Artistic License can + be found in '/usr/share/common-licenses/Artistic'. --- libpdf-report-perl-1.30.orig/debian/docs +++ libpdf-report-perl-1.30/debian/docs @@ -0,0 +1,2 @@ +README +Changes --- libpdf-report-perl-1.30.orig/debian/rules +++ libpdf-report-perl-1.30/debian/rules @@ -0,0 +1,74 @@ +#!/usr/bin/make -f +#-*- makefile -*- +# Made with the aid of dh_make, by Craig Small +# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. +# Some lines taken from debmake, by Christoph Lameter. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +PACKAGE=$(shell dh_listpackages) + +ifndef PERL +PERL = /usr/bin/perl +endif + +ifndef DESTDIR +DESTDIR=.. +endif +TMP =`pwd`/debian/$(PACKAGE) + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + $(PERL) Makefile.PL INSTALLDIRS=vendor + $(MAKE) + $(MAKE) test + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + [ ! -e Makefile ] || $(MAKE) distclean + + dh_clean + +install: + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp. + $(MAKE) install PREFIX=$(TMP)/usr + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installdocs -XChanges + dh_installexamples examples/* + dh_installman + dh_installchangelogs Changes + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb --destdir=$(DESTDIR) + +# Build architecture-dependent files here. +binary-arch: build install +# We have nothing to do by default. + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary