r701 - in packages/libpdf-api2-perl/trunk: . debian lib/PDF lib/PDF/API2 lib/PDF/API2/Basic/PDF lib/PDF/API2/Basic/TTF lib/PDF/API2/Basic/TTF/Kern
Gunnar Wolf
gwolf@costa.debian.org
Wed, 02 Mar 2005 02:45:13 +0100
Author: gwolf
Date: 2005-03-02 02:45:11 +0100 (Wed, 02 Mar 2005)
New Revision: 701
Modified:
packages/libpdf-api2-perl/trunk/CHANGELOG
packages/libpdf-api2-perl/trunk/debian/changelog
packages/libpdf-api2-perl/trunk/lib/PDF/API2.pm
packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/PDF/Bool.pm
packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/PDF/File.pm
packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/PDF/Filter.pm
packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Bsln.pm
packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Fdsc.pm
packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/GDEF.pm
packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Hhea.pm
packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Kern/CompactClassArray.pm
packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/PCLT.pm
packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Ttopen.pm
packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Vhea.pm
packages/libpdf-api2-perl/trunk/lib/PDF/API2/Content.pm
packages/libpdf-api2-perl/trunk/lib/PDF/API2/Lite.pm
packages/libpdf-api2-perl/trunk/lib/PDF/API2/Version.pm
Log:
New upstream release 0.40.96
Modified: packages/libpdf-api2-perl/trunk/CHANGELOG
===================================================================
--- packages/libpdf-api2-perl/trunk/CHANGELOG 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/CHANGELOG 2005-03-02 01:45:11 UTC (rev 701)
@@ -1,3 +1,38 @@
+2005-02-28 19:00 fredo
+
+ * lib/PDF/API2/Lite.pm: removed color method since businesscolor is
+ not available anymore in PDF::API2
+
+2005-02-25 19:07 fredo
+
+ * lib/PDF/API2.pm: no message
+
+2005-02-24 00:11 fredo
+
+ * lib/PDF/API2/Basic/PDF/File.pm: workaround for
+ illustrator/enfocus bug to import objects
+
+2005-02-22 23:59 fredo
+
+ * lib/PDF/API2/Content.pm: fixed infinite loop in paragraph if
+ words longer than a paragraph are present.
+
+2005-02-21 23:15 fredo
+
+ * lib/PDF/API2/Basic/: PDF/Bool.pm, PDF/Filter.pm, TTF/Bsln.pm,
+ TTF/Fdsc.pm, TTF/GDEF.pm, TTF/Hhea.pm, TTF/PCLT.pm,
+ TTF/Ttopen.pm, TTF/Vhea.pm, TTF/Kern/CompactClassArray.pm:
+ correcting NAME section, thanks to SAPER <SAPER@cpan.org>
+
+2005-02-17 15:50 fredo
+
+ * Makefile: some
+
+2005-02-17 08:03 fredo
+
+ * lib/PDF/API2.pm: added 'pageencaps' default option to fix unusual
+ styled content streams
+
2005-02-14 21:09 fredo
* lib/PDF/API2.pm: fixed an openpage recompression bug / thanks to
Modified: packages/libpdf-api2-perl/trunk/debian/changelog
===================================================================
--- packages/libpdf-api2-perl/trunk/debian/changelog 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/debian/changelog 2005-03-02 01:45:11 UTC (rev 701)
@@ -1,3 +1,9 @@
+libpdf-api2-perl (0.40.96-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Gunnar Wolf <gwolf@debian.org> Tue, 1 Mar 2005 19:31:26 -0600
+
libpdf-api2-perl (0.40.91-2) unstable; urgency=low
* The documentation is finally built as it should, with all the
Modified: packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/PDF/Bool.pm
===================================================================
--- packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/PDF/Bool.pm 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/PDF/Bool.pm 2005-03-02 01:45:11 UTC (rev 701)
@@ -21,7 +21,7 @@
# This specific module is licensed under the Perl Artistic License.
#
#
-# $Id: Bool.pm,v 1.6 2004/12/16 00:30:52 fredo Exp $
+# $Id: Bool.pm,v 1.7 2005/02/21 22:15:45 fredo Exp $
#
#=======================================================================
package PDF::API2::Basic::PDF::Bool;
@@ -35,7 +35,7 @@
=head1 NAME
-PDF::Bool - A special form of L<PDF::String> which holds the strings
+PDF::API2::Basic::PDF::Bool - A special form of L<PDF::String> which holds the strings
B<true> or B<false>
=head1 METHODS
Modified: packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/PDF/File.pm
===================================================================
--- packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/PDF/File.pm 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/PDF/File.pm 2005-03-02 01:45:11 UTC (rev 701)
@@ -23,7 +23,7 @@
# This specific module is licensed under the Perl Artistic License.
#
#
-# $Id: File.pm,v 1.16 2005/01/24 11:46:07 fredo Exp $
+# $Id: File.pm,v 1.17 2005/02/23 23:11:58 fredo Exp $
#
#=======================================================================
package PDF::API2::Basic::PDF::File;
@@ -576,14 +576,23 @@
$res = PDFDict();
while ($str !~ m/^>>/o) {
- if ($str =~ s|^/($reg_char+)||o) {
+ if ($str =~ s|^/($reg_char+)||o)
+ {
$k = PDF::API2::Basic::PDF::Name::name_to_string ($1, $self);
($value, $str) = $self->readval($str, %opts);
$res->{$k} = $value;
- } elsif($str =~ s|^/$ws_char+||o) {
+ }
+ elsif($str =~ s|^/$ws_char+||o)
+ {
# fixes a broken key problem of acrobat. -- fredo
($value, $str) = $self->readval($str, %opts);
$res->{null} = $value;
+ }
+ elsif($str =~ s|^//|/|o)
+ {
+ # fixes again a broken key problem of illustrator/enfocus. -- fredo
+ ($value, $str) = $self->readval($str, %opts);
+ $res->{null} = $value;
}
$str = update($fh, $str); # thanks gareth.jones@stud.man.ac.uk
}
Modified: packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/PDF/Filter.pm
===================================================================
--- packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/PDF/Filter.pm 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/PDF/Filter.pm 2005-03-02 01:45:11 UTC (rev 701)
@@ -21,7 +21,7 @@
# This specific module is licensed under the Perl Artistic License.
#
#
-# $Id: Filter.pm,v 1.9 2004/12/16 00:30:52 fredo Exp $
+# $Id: Filter.pm,v 1.10 2005/02/21 22:15:45 fredo Exp $
#
#=======================================================================
package PDF::API2::Basic::PDF::Filter;
@@ -30,7 +30,7 @@
=head1 NAME
-PDF::Filter - Abstract superclass for PDF stream filters
+PDF::API2::Basic::PDF::Filter - Abstract superclass for PDF stream filters
=head1 SYNOPSIS
Modified: packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Bsln.pm
===================================================================
--- packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Bsln.pm 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Bsln.pm 2005-03-02 01:45:11 UTC (rev 701)
@@ -21,14 +21,14 @@
# This specific module is licensed under the Perl Artistic License.
#
#
-# $Id: Bsln.pm,v 1.5 2004/06/15 09:13:13 fredo Exp $
+# $Id: Bsln.pm,v 1.6 2005/02/21 22:15:45 fredo Exp $
#
#=======================================================================
package PDF::API2::Basic::TTF::Bsln;
=head1 NAME
-PDF::API2::Basic::TTF::AAT::Bsln - Baseline table in a font
+PDF::API2::Basic::TTF::Bsln - Baseline table in a font
=head1 DESCRIPTION
Modified: packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Fdsc.pm
===================================================================
--- packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Fdsc.pm 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Fdsc.pm 2005-03-02 01:45:11 UTC (rev 701)
@@ -21,14 +21,14 @@
# This specific module is licensed under the Perl Artistic License.
#
#
-# $Id: Fdsc.pm,v 1.5 2004/06/15 09:13:37 fredo Exp $
+# $Id: Fdsc.pm,v 1.6 2005/02/21 22:15:45 fredo Exp $
#
#=======================================================================
package PDF::API2::Basic::TTF::Fdsc;
=head1 NAME
-PDF::API2::Basic::TTF::AAT::Fdsc - Font Descriptors table in a font
+PDF::API2::Basic::TTF::Fdsc - Font Descriptors table in a font
=head1 DESCRIPTION
Modified: packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/GDEF.pm
===================================================================
--- packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/GDEF.pm 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/GDEF.pm 2005-03-02 01:45:11 UTC (rev 701)
@@ -21,14 +21,14 @@
# This specific module is licensed under the Perl Artistic License.
#
#
-# $Id: GDEF.pm,v 1.5 2004/06/15 09:13:37 fredo Exp $
+# $Id: GDEF.pm,v 1.6 2005/02/21 22:15:45 fredo Exp $
#
#=======================================================================
package PDF::API2::Basic::TTF::GDEF;
=head1 NAME
-PDF::API2::Basic::TTF::Gdef - Opentype GDEF table support
+PDF::API2::Basic::TTF::GDEF - Opentype GDEF table support
=head1 DESCRIPTION
Modified: packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Hhea.pm
===================================================================
--- packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Hhea.pm 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Hhea.pm 2005-03-02 01:45:11 UTC (rev 701)
@@ -21,14 +21,14 @@
# This specific module is licensed under the Perl Artistic License.
#
#
-# $Id: Hhea.pm,v 1.5 2004/06/15 09:13:37 fredo Exp $
+# $Id: Hhea.pm,v 1.6 2005/02/21 22:15:45 fredo Exp $
#
#=======================================================================
package PDF::API2::Basic::TTF::Hhea;
=head1 NAME
-TTF:Hhea - Horizontal Header table
+PDF::API2::Basic::TTF::Hhea - Horizontal Header table
=head1 DESCRIPTION
Modified: packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Kern/CompactClassArray.pm
===================================================================
--- packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Kern/CompactClassArray.pm 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Kern/CompactClassArray.pm 2005-03-02 01:45:11 UTC (rev 701)
@@ -21,14 +21,14 @@
# This specific module is licensed under the Perl Artistic License.
#
#
-# $Id: CompactClassArray.pm,v 1.5 2004/06/15 09:14:41 fredo Exp $
+# $Id: CompactClassArray.pm,v 1.6 2005/02/21 22:15:45 fredo Exp $
#
#=======================================================================
package PDF::API2::Basic::TTF::Kern::CompactClassArray;
=head1 NAME
-PDF::API2::Basic::TTF::AAT::Kern::CompactClassArray
+PDF::API2::Basic::TTF::Kern::CompactClassArray
=head1 METHODS
Modified: packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/PCLT.pm
===================================================================
--- packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/PCLT.pm 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/PCLT.pm 2005-03-02 01:45:11 UTC (rev 701)
@@ -21,14 +21,14 @@
# This specific module is licensed under the Perl Artistic License.
#
#
-# $Id: PCLT.pm,v 1.5 2004/06/15 09:14:40 fredo Exp $
+# $Id: PCLT.pm,v 1.6 2005/02/21 22:15:45 fredo Exp $
#
#=======================================================================
package PDF::API2::Basic::TTF::PCLT;
=head1 NAME
-PDF::API2::Basic::TTF::Pclt - PCLT TrueType font table
+PDF::API2::Basic::TTF::PCLT - PCLT TrueType font table
=head1 DESCRIPTION
Modified: packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Ttopen.pm
===================================================================
--- packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Ttopen.pm 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Ttopen.pm 2005-03-02 01:45:11 UTC (rev 701)
@@ -21,14 +21,14 @@
# This specific module is licensed under the Perl Artistic License.
#
#
-# $Id: Ttopen.pm,v 1.5 2004/06/15 09:14:41 fredo Exp $
+# $Id: Ttopen.pm,v 1.6 2005/02/21 22:15:45 fredo Exp $
#
#=======================================================================
package PDF::API2::Basic::TTF::Ttopen;
=head1 NAME
-PDF::API2::Basic::TTF::ttopen - Opentype superclass for standard Opentype lookup based tables
+PDF::API2::Basic::TTF::Ttopen - Opentype superclass for standard Opentype lookup based tables
(GSUB and GPOS)
=head1 DESCRIPTION
Modified: packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Vhea.pm
===================================================================
--- packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Vhea.pm 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/lib/PDF/API2/Basic/TTF/Vhea.pm 2005-03-02 01:45:11 UTC (rev 701)
@@ -21,14 +21,14 @@
# This specific module is licensed under the Perl Artistic License.
#
#
-# $Id: Vhea.pm,v 1.5 2004/06/15 09:14:41 fredo Exp $
+# $Id: Vhea.pm,v 1.6 2005/02/21 22:15:45 fredo Exp $
#
#=======================================================================
package PDF::API2::Basic::TTF::Vhea;
=head1 NAME
-TTF:Vhea - Vertical Header table
+PDF::API2::Basic::TTF::Vhea - Vertical Header table
=head1 DESCRIPTION
Modified: packages/libpdf-api2-perl/trunk/lib/PDF/API2/Content.pm
===================================================================
--- packages/libpdf-api2-perl/trunk/lib/PDF/API2/Content.pm 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/lib/PDF/API2/Content.pm 2005-03-02 01:45:11 UTC (rev 701)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: Content.pm,v 1.30 2005/02/07 19:31:24 fredo Exp $
+# $Id: Content.pm,v 1.31 2005/02/22 22:59:49 fredo Exp $
#
#=======================================================================
@@ -47,7 +47,7 @@
@ISA = qw(PDF::API2::Basic::PDF::Dict);
- ( $VERSION ) = '$Revision: 1.30 $' =~ /Revision: (\S+)\s/; # $Date: 2005/02/07 19:31:24 $
+ ( $VERSION ) = '$Revision: 1.31 $' =~ /Revision: (\S+)\s/; # $Date: 2005/02/22 22:59:49 $
}
@@ -1808,7 +1808,7 @@
sub text_fill_left
{
my ($self,$text,$width,%opts)=@_;
- my ($line,$ret)=$self->_text_fill_line($text,$width);
+ my ($line,$ret)=$self->_text_fill_line($text,$width,1);
$width=$self->text($line,%opts);
return($width,$ret);
}
@@ -1822,7 +1822,7 @@
sub text_fill_center
{
my ($self,$text,$width,%opts)=@_;
- my ($line,$ret)=$self->_text_fill_line($text,$width);
+ my ($line,$ret)=$self->_text_fill_line($text,$width,1);
$width=$self->text_center($line,%opts);
return($width,$ret);
}
@@ -1836,7 +1836,7 @@
sub text_fill_right
{
my ($self,$text,$width,%opts)=@_;
- my ($line,$ret)=$self->_text_fill_line($text,$width);
+ my ($line,$ret)=$self->_text_fill_line($text,$width,1);
$width=$self->text_right($line,%opts);
return($width,$ret);
}
@@ -2040,6 +2040,9 @@
=head1 HISTORY
$Log: Content.pm,v $
+ Revision 1.31 2005/02/22 22:59:49 fredo
+ fixed infinite loop in paragraph if words longer than a paragraph are present.
+
Revision 1.30 2005/02/07 19:31:24 fredo
fixed reset of textlinematrix on textmatrix set/resets
Modified: packages/libpdf-api2-perl/trunk/lib/PDF/API2/Lite.pm
===================================================================
--- packages/libpdf-api2-perl/trunk/lib/PDF/API2/Lite.pm 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/lib/PDF/API2/Lite.pm 2005-03-02 01:45:11 UTC (rev 701)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: Lite.pm,v 1.8 2004/12/16 00:30:51 fredo Exp $
+# $Id: Lite.pm,v 1.9 2005/02/28 18:00:06 fredo Exp $
#
#=======================================================================
@@ -43,7 +43,7 @@
use vars qw( $VERSION $hasWeakRef );
- ( $VERSION ) = '$Revision: 1.8 $' =~ /Revision: (\S+)\s/; # $Date: 2004/12/16 00:30:51 $
+ ( $VERSION ) = '$Revision: 1.9 $' =~ /Revision: (\S+)\s/; # $Date: 2005/02/28 18:00:06 $
}
@@ -198,28 +198,28 @@
return $self->{api}->psfont(@args);
}
-=item @color = $pdf->color $colornumber [, $lightdark ]
+#=item @color = $pdf->color $colornumber [, $lightdark ]
+#
+#=item @color = $pdf->color $basecolor [, $lightdark ]
+#
+#Returns a color.
+#
+#B<Examples:>
+#
+# @color = $pdf->color(0); # 50% grey
+# @color = $pdf->color(0,+4); # 10% grey
+# @color = $pdf->color(0,-3); # 80% grey
+# @color = $pdf->color('yellow'); # yellow, fully saturated
+# @color = $pdf->color('red',+1); # red, +10% white
+# @color = $pdf->color('green',-2); # green, +20% black
+#
+#=cut
+#
+#sub color {
+# my $self=shift @_;
+# return $self->{api}->businesscolor(@_);
+#}
-=item @color = $pdf->color $basecolor [, $lightdark ]
-
-Returns a color.
-
-B<Examples:>
-
- @color = $pdf->color(0); # 50% grey
- @color = $pdf->color(0,+4); # 10% grey
- @color = $pdf->color(0,-3); # 80% grey
- @color = $pdf->color('yellow'); # yellow, fully saturated
- @color = $pdf->color('red',+1); # red, +10% white
- @color = $pdf->color('green',-2); # green, +20% black
-
-=cut
-
-sub color {
- my $self=shift @_;
- return $self->{api}->businesscolor(@_);
-}
-
=item $egs = $pdf->create_egs
Returns a new extended-graphics-state object.
@@ -670,6 +670,9 @@
=head1 HISTORY
$Log: Lite.pm,v $
+ Revision 1.9 2005/02/28 18:00:06 fredo
+ removed color method since businesscolor is not available anymore in PDF::API2
+
Revision 1.8 2004/12/16 00:30:51 fredo
added no warn for recursion
Modified: packages/libpdf-api2-perl/trunk/lib/PDF/API2/Version.pm
===================================================================
--- packages/libpdf-api2-perl/trunk/lib/PDF/API2/Version.pm 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/lib/PDF/API2/Version.pm 2005-03-02 01:45:11 UTC (rev 701)
@@ -9,18 +9,18 @@
package PDF::API2::Version;
BEGIN {
use vars qw( $VERSION %CVersion );
- $VERSION = '0.40.91';
+ $VERSION = '0.40.96';
%CVersion = (
- 'vFredo' => 'PDF::API2 0.40.91 (stable-3419 / 2005-02-14)',
- 'vGNU' => 'PDF::API2 0.40.91 (2005-02-14 21:10:18)',
- 'vHex' => '0x00028D5B',
- 'vLong' => '0.40.91 (2005-02-14 21:10:18)',
- 'vPerl' => '0.40.91',
- 'vShort' => '0.40.91',
- 'vSquid' => '0.40-stable-3419',
- 'vTeX' => 'This is PDF::API2, Version 0.40.91 (2005-02-14 21:10:18)',
- 'vWeb' => 'PDF::API2/0.40.91',
- 'vWin' => '0.40 build 3419',
+ 'vFredo' => 'PDF::API2 0.40.96 (stable-3424 / 2005-02-28)',
+ 'vGNU' => 'PDF::API2 0.40.96 (2005-02-28 19:00:35)',
+ 'vHex' => '0x00028D60',
+ 'vLong' => '0.40.96 (2005-02-28 19:00:35)',
+ 'vPerl' => '0.40.96',
+ 'vShort' => '0.40.96',
+ 'vSquid' => '0.40-stable-3424',
+ 'vTeX' => 'This is PDF::API2, Version 0.40.96 (2005-02-28 19:00:35)',
+ 'vWeb' => 'PDF::API2/0.40.96',
+ 'vWin' => '0.40 build 3424',
);
}
1;
@@ -36,16 +36,16 @@
=head1 VERSION
- vFredo: PDF::API2 0.40.91 (stable-3419 / 2005-02-14)
- vGNU: PDF::API2 0.40.91 (2005-02-14 21:10:18)
- vHex: 0x00028D5B
- vLong: 0.40.91 (2005-02-14 21:10:18)
- vPerl: 0.40.91
- vShort: 0.40.91
- vSquid: 0.40-stable-3419
- vTeX: This is PDF::API2, Version 0.40.91 (2005-02-14 21:10:18)
- vWeb: PDF::API2/0.40.91
- vWin: 0.40 build 3419
+ vFredo: PDF::API2 0.40.96 (stable-3424 / 2005-02-28)
+ vGNU: PDF::API2 0.40.96 (2005-02-28 19:00:35)
+ vHex: 0x00028D60
+ vLong: 0.40.96 (2005-02-28 19:00:35)
+ vPerl: 0.40.96
+ vShort: 0.40.96
+ vSquid: 0.40-stable-3424
+ vTeX: This is PDF::API2, Version 0.40.96 (2005-02-28 19:00:35)
+ vWeb: PDF::API2/0.40.96
+ vWin: 0.40 build 3424
=cut
Modified: packages/libpdf-api2-perl/trunk/lib/PDF/API2.pm
===================================================================
--- packages/libpdf-api2-perl/trunk/lib/PDF/API2.pm 2005-03-02 01:29:54 UTC (rev 700)
+++ packages/libpdf-api2-perl/trunk/lib/PDF/API2.pm 2005-03-02 01:45:11 UTC (rev 701)
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: API2.pm,v 1.72 2005/02/14 20:09:48 fredo Exp $
+# $Id: API2.pm,v 1.74 2005/02/25 18:07:48 fredo Exp $
#
#=======================================================================
@@ -37,7 +37,7 @@
use vars qw( $VERSION $seq @FontDirs );
- ($VERSION) = ('$Revision: 1.72 $' =~ /Revision: (\S+)\s/)[0]; # $Date: 2005/02/14 20:09:48 $
+ ($VERSION) = ('$Revision: 1.74 $' =~ /Revision: (\S+)\s/)[0]; # $Date: 2005/02/25 18:07:48 $
@FontDirs = ( (map { "$_/PDF/API2/fonts" } @INC),
qw[ /usr/share/fonts /usr/local/share/fonts c:/windows/fonts c:/winnt/fonts ] );
@@ -484,6 +484,8 @@
I<nounrotate> ... prohibits API2 from rotating imported/opened page to re-create a default pdf-context.
+I<pageencaps> ... enables than API2 will add save/restore commands upon imported/opened pages to preserve graphics-state for modification.
+
I<copyannots> ... enables importing of annotations (B<*EXPERIMENTAL*>).
=cut
@@ -790,22 +792,29 @@
my $index=shift @_||0;
my ($page,$rotate,$media,$trans);
- if($index==0) {
+ if($index==0)
+ {
$page=$self->{pagestack}->[-1];
- } elsif($index<0) {
+ }
+ elsif($index<0)
+ {
$page=$self->{pagestack}->[$index];
- } else {
+ }
+ else
+ {
$page=$self->{pagestack}->[$index-1];
}
- if(ref($page) ne 'PDF::API2::Page') {
+ if(ref($page) ne 'PDF::API2::Page')
+ {
bless($page,'PDF::API2::Page');
$page->{' apipdf'}=$self->{pdf};
$page->{' api'}=$self;
$self->{pdf}->out_obj($page);
- if(($rotate=$page->find_prop('Rotate')) && (!defined($page->{' fixed'}) || $page->{' fixed'}<1)) {
+ if(($rotate=$page->find_prop('Rotate')) && (!defined($page->{' fixed'}) || $page->{' fixed'}<1))
+ {
$rotate=($rotate->val+360)%360;
- if($rotate!=0 && !$self->{nounrotate}) {
+ if($rotate!=0 && !$self->default('nounrotate')) {
$page->{Rotate}=PDFNum(0);
foreach my $mediatype (qw( MediaBox CropBox BleedBox TrimBox ArtBox )) {
if($media=$page->find_prop($mediatype)) {
@@ -839,10 +848,19 @@
my $content=$page->gfx();
$content->add(" $trans ");
- foreach my $k ($uncontent->elementsof) {
+ if($self->default('pageencaps'))
+ {
+ $content->{' stream'}.=" q ";
+ }
+ foreach my $k ($uncontent->elementsof)
+ {
$k->realise;
- $content->{' stream'}.=" ".unfilter($k->{Filter}, $k->{' stream'})." ";
+ $content->{' stream'}.=" ".unfilter($k->{Filter}, $k->{' stream'})." ";
}
+ if($self->default('pageencaps'))
+ {
+ $content->{' stream'}.=" Q ";
+ }
## $content->{Length}=PDFNum(length($content->{' stream'}));
# this will be fixed by the following code or content or filters
@@ -2149,6 +2167,12 @@
=head1 HISTORY
$Log: API2.pm,v $
+ Revision 1.74 2005/02/25 18:07:48 fredo
+ no message
+
+ Revision 1.73 2005/02/17 07:03:14 fredo
+ added 'pageencaps' default option to fix unusual styled content streams
+
Revision 1.72 2005/02/14 20:09:48 fredo
fixed an openpage recompression bug / thanks to steve_wu@iinet.net.au