r4710 - in /packages/libpdf-api2-perl/branches/upstream/current: ./
lib/PDF/API2/ lib/PDF/API2/Resource/
lib/PDF/API2/Resource/CIDFont/TrueType/
gwolf at users.alioth.debian.org
gwolf at users.alioth.debian.org
Wed Jan 10 16:11:02 CET 2007
Author: gwolf
Date: Wed Jan 10 16:11:01 2007
New Revision: 4710
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=4710
Log:
[svn-upgrade] Integrating new upstream version, libpdf-api2-perl (0.57)
Modified:
packages/libpdf-api2-perl/branches/upstream/current/MANIFEST
packages/libpdf-api2-perl/branches/upstream/current/META.yml
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Content.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/BaseFont.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/UniFont.pm
packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Version.pm
Modified: packages/libpdf-api2-perl/branches/upstream/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpdf-api2-perl/branches/upstream/current/MANIFEST?rev=4710&op=diff
==============================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/MANIFEST (original)
+++ packages/libpdf-api2-perl/branches/upstream/current/MANIFEST Wed Jan 10 16:11:01 2007
@@ -223,4 +223,4 @@
contrib/pdf-optimize.pl
contrib/pdf-merge.pl
META.yml Module meta-data (added by MakeMaker)
-
+
Modified: packages/libpdf-api2-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpdf-api2-perl/branches/upstream/current/META.yml?rev=4710&op=diff
==============================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/META.yml (original)
+++ packages/libpdf-api2-perl/branches/upstream/current/META.yml Wed Jan 10 16:11:01 2007
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: PDF-API2
-version: 0.55
+version: 0.57
version_from: lib/PDF/API2/Version.pm
installdirs: site
requires:
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Content.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Content.pm?rev=4710&op=diff
==============================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Content.pm (original)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Content.pm Wed Jan 10 16:11:01 2007
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: Content.pm,v 2.1 2006/06/19 19:25:44 areibens Exp $
+# $Id: Content.pm,v 2.2 2007/01/04 16:02:28 areibens Exp $
#
#=======================================================================
@@ -47,7 +47,7 @@
@ISA = qw(PDF::API2::Basic::PDF::Dict);
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 2.1 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2006/06/19 19:25:44 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 2.2 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2007/01/04 16:02:28 $
}
@@ -1813,19 +1813,22 @@
}
if(defined $opt{-indent})
{
- $self->add('[',(-$opt{-indent}*(1000/$self->{' fontsize'})*(100/$self->hspace)),']','TJ');
$wd+=$opt{-indent};
$self->matrix_update($wd,0);
}
my $ulxy1=[$self->textpos2];
- #if($self->{' font'}->isvirtual)
- #{
- $self->add($self->{' font'}->text($text,$self->{' fontsize'}));
- #}
- #else
- #{
- # $self->add($self->{' font'}->text($text),'Tj');
- #}
+
+ if(defined $opt{-indent})
+ {
+ # changed fot acrobat 8 and possible others
+ # $self->add('[',(-$opt{-indent}*(1000/$self->{' fontsize'})*(100/$self->hspace)),']','TJ');
+ $self->add($self->{' font'}->text($text, $self->{' fontsize'}, (-$opt{-indent}*(1000/$self->{' fontsize'})*(100/$self->hspace))));
+ }
+ else
+ {
+ $self->add($self->{' font'}->text($text,$self->{' fontsize'}));
+ }
+
$wd=$self->advancewidth($text);
$self->matrix_update($wd,0);
@@ -2163,6 +2166,9 @@
=head1 HISTORY
$Log: Content.pm,v $
+ Revision 2.2 2007/01/04 16:02:28 areibens
+ applied untested fix for acrobat 8 "<ident> TJ" bug
+
Revision 2.1 2006/06/19 19:25:44 areibens
fixed compress vs. Compress::ZLib subs
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/BaseFont.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/BaseFont.pm?rev=4710&op=diff
==============================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/BaseFont.pm (original)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/BaseFont.pm Wed Jan 10 16:11:01 2007
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: BaseFont.pm,v 2.3 2006/08/14 18:11:47 areibens Exp $
+# $Id: BaseFont.pm,v 2.5 2007/01/04 16:33:20 areibens Exp $
#
#=======================================================================
package PDF::API2::Resource::BaseFont;
@@ -46,7 +46,7 @@
@ISA = qw( PDF::API2::Resource );
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 2.3 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2006/08/14 18:11:47 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 2.5 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2007/01/04 16:33:20 $
}
no warnings qw[ deprecated recursion uninitialized ];
@@ -726,18 +726,32 @@
sub text
{
- my ($self,$text,$size)=@_;
+ my ($self,$text,$size,$ident)=@_;
my $newtext=$self->textByStr($text);
if(defined $size && $self->{-dokern})
{
$newtext=$self->textByStrKern($text);
- return("[ $newtext ] TJ");
+ if(defined($ident) && $ident!=0)
+ {
+ return("[ $ident $newtext ] TJ");
+ }
+ else
+ {
+ return("[ $newtext ] TJ");
+ }
}
elsif(defined $size)
{
- return("[ ($newtext) ] TJ");
+ if(defined($ident) && $ident!=0)
+ {
+ return("[ $ident ($newtext) ] TJ");
+ }
+ else
+ {
+ return("[ ($newtext) ] TJ");
+ }
}
else
{
@@ -760,6 +774,12 @@
=head1 HISTORY
$Log: BaseFont.pm,v $
+ Revision 2.5 2007/01/04 16:33:20 areibens
+ fix acro 8 fix
+
+ Revision 2.4 2007/01/04 16:02:28 areibens
+ applied untested fix for acrobat 8 "<ident> TJ" bug
+
Revision 2.3 2006/08/14 18:11:47 areibens
fixed wxByGlyph
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont.pm?rev=4710&op=diff
==============================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont.pm (original)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont.pm Wed Jan 10 16:11:01 2007
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: CIDFont.pm,v 2.1 2006/06/19 19:22:07 areibens Exp $
+# $Id: CIDFont.pm,v 2.2 2007/01/04 16:02:28 areibens Exp $
#
#=======================================================================
package PDF::API2::Resource::CIDFont;
@@ -49,7 +49,7 @@
@ISA = qw( PDF::API2::Resource::BaseFont );
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 2.1 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2006/06/19 19:22:07 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 2.2 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2007/01/04 16:02:28 $
}
no warnings qw[ deprecated recursion uninitialized ];
@@ -229,22 +229,29 @@
sub textByStrKern
{
- my ($self,$text,$size)=@_;
- return($self->text_cid_kern($self->cidsByStr($text),$size));
+ my ($self,$text,$size,$ident)=@_;
+ return($self->text_cid_kern($self->cidsByStr($text),$size,$ident));
}
sub text
{
- my ($self,$text,$size)=@_;
+ my ($self,$text,$size,$ident)=@_;
my $newtext=$self->textByStr($text);
if(defined $size && $self->{-dokern})
{
- $newtext=$self->textByStrKern($text,$size);
+ $newtext=$self->textByStrKern($text,$size,$ident);
return($newtext);
}
elsif(defined $size)
{
- return("$newtext Tj");
+ if(defined($ident) && $ident!=0)
+ {
+ return("[ $ident $newtext ] TJ");
+ }
+ else
+ {
+ return("$newtext Tj");
+ }
}
else
{
@@ -275,7 +282,7 @@
sub text_cid_kern
{
- my ($self,$text,$size)=@_;
+ my ($self,$text,$size,$ident)=@_;
if(UNIVERSAL::can($self,'fontfile'))
{
foreach my $g (unpack('n*',$text))
@@ -285,30 +292,44 @@
}
if(defined $size && $self->{-dokern} && $self->haveKernPairs())
{
- my $newtext=' ';
- my $lastglyph=0;
- my $tBefore=0;
- foreach my $n (unpack('n*',$text))
+ my $newtext=' ';
+ my $lastglyph=0;
+ my $tBefore=0;
+ foreach my $n (unpack('n*',$text))
+ {
+ if($self->kernPairCid($lastglyph, $n))
{
- if($self->kernPairCid($lastglyph, $n))
- {
- $newtext.='> ' if($tBefore);
- $newtext.=sprintf('%i ',$self->kernPairCid($lastglyph, $n));
- $tBefore=0;
- }
- $lastglyph=$n;
- my $t=sprintf('%04X',$n);
- $newtext.='<' if(!$tBefore);
- $newtext.=$t;
- $tBefore=1;
+ $newtext.='> ' if($tBefore);
+ $newtext.=sprintf('%i ',$self->kernPairCid($lastglyph, $n));
+ $tBefore=0;
}
- $newtext.='> ' if($tBefore);
+ $lastglyph=$n;
+ my $t=sprintf('%04X',$n);
+ $newtext.='<' if(!$tBefore);
+ $newtext.=$t;
+ $tBefore=1;
+ }
+ $newtext.='> ' if($tBefore);
+ if(defined($ident) && $ident!=0)
+ {
+ return("[ $ident $newtext ] TJ");
+ }
+ else
+ {
return("[ $newtext ] TJ");
+ }
}
elsif(defined $size)
{
my $newtext=unpack('H*',$text);
- return("<$newtext> Tj");
+ if(defined($ident) && $ident!=0)
+ {
+ return("[ $ident <$newtext> ] TJ");
+ }
+ else
+ {
+ return("<$newtext> Tj");
+ }
}
else
{
@@ -386,6 +407,9 @@
=head1 HISTORY
$Log: CIDFont.pm,v $
+ Revision 2.2 2007/01/04 16:02:28 areibens
+ applied untested fix for acrobat 8 "<ident> TJ" bug
+
Revision 2.1 2006/06/19 19:22:07 areibens
removed dup sub
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm?rev=4710&op=diff
==============================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm (original)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm Wed Jan 10 16:11:01 2007
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: FontFile.pm,v 2.0 2005/11/16 02:18:14 areibens Exp $
+# $Id: FontFile.pm,v 2.1 2007/01/04 17:39:40 areibens Exp $
#
#=======================================================================
package PDF::API2::Resource::CIDFont::TrueType::FontFile;
@@ -49,7 +49,7 @@
@ISA = qw( PDF::API2::Basic::PDF::Dict );
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 2.0 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/11/16 02:18:14 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 2.1 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2007/01/04 17:39:40 $
$cmap={};
}
no warnings qw[ recursion uninitialized ];
@@ -636,6 +636,12 @@
$data->{kern}=read_kern_table($font,$data->{upem},$self);
delete $data->{kern} unless(defined $data->{kern});
+
+ $data->{fontname}=~s/[^a-zA-Z0-9]//og;
+ $data->{fontfamily}=~s/[^a-zA-Z0-9]//og;
+ $data->{apiname}=~s/[^a-zA-Z0-9]//og;
+ $data->{altname}=~s/[^a-zA-Z0-9]//og;
+ $data->{subname}=~s/[^a-zA-Z0-9]//og;
return($self,$data);
}
@@ -716,6 +722,9 @@
=head1 HISTORY
$Log: FontFile.pm,v $
+ Revision 2.1 2007/01/04 17:39:40 areibens
+ fixed [rt.cpan.org #24203] Incompatibility in Wide character handling
+
Revision 2.0 2005/11/16 02:18:14 areibens
revision workaround for SF cvs import not to screw up CPAN
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/UniFont.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/UniFont.pm?rev=4710&op=diff
==============================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/UniFont.pm (original)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Resource/UniFont.pm Wed Jan 10 16:11:01 2007
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: UniFont.pm,v 2.0 2005/11/16 02:16:04 areibens Exp $
+# $Id: UniFont.pm,v 2.1 2007/01/04 16:02:28 areibens Exp $
#
#=======================================================================
package PDF::API2::Resource::UniFont;
@@ -43,7 +43,7 @@
use vars qw($VERSION);
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 2.0 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2005/11/16 02:16:04 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 2.1 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2007/01/04 16:02:28 $
}
no warnings qw[ deprecated recursion uninitialized ];
@@ -269,7 +269,7 @@
sub text
{
- my ($self,$text,$size)=@_;
+ my ($self,$text,$size,$ident)=@_;
$text=decode($self->{encode},$text) unless(is_utf8($text));
die 'textsize not specified' unless(defined $size);
my $newtext='';
@@ -291,7 +291,15 @@
if($thisfont!=$lastfont && $lastfont!=-1)
{
my $f=$self->fontlist->[$lastfont];
- $newtext.='/'.$f->name.' '.$size.' Tf '.$f->text(pack('U*', at codes)).' Tj ';
+ if(defined($ident) && $ident!=0)
+ {
+ $newtext.='/'.$f->name.' '.$size.' Tf ['.$ident.' '.$f->text(pack('U*', at codes)).'] TJ ';
+ $ident=undef;
+ }
+ else
+ {
+ $newtext.='/'.$f->name.' '.$size.' Tf '.$f->text(pack('U*', at codes)).' Tj ';
+ }
@codes=();
}
@@ -302,7 +310,6 @@
if(scalar @codes > 0)
{
my $f=$self->fontlist->[$lastfont];
- ## $newtext.='/'.$f->name.' '.$size.' Tf '.$f->text(pack('U*', at codes)).' Tj ';
$newtext.='/'.$f->name.' '.$size.' Tf '.$f->text(pack('U*', at codes),$size).' ';
}
Modified: packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Version.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Version.pm?rev=4710&op=diff
==============================================================================
--- packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Version.pm (original)
+++ packages/libpdf-api2-perl/branches/upstream/current/lib/PDF/API2/Version.pm Wed Jan 10 16:11:01 2007
@@ -9,18 +9,18 @@
package PDF::API2::Version;
BEGIN {
use vars qw( $VERSION %CVersion );
- $VERSION = '0.55';
+ $VERSION = '0.57';
%CVersion = (
- 'vFredo' => 'PDF::API2 0.55 (fix-3328 / 2006-08-14)',
- 'vGNU' => 'PDF::API2 0.55 (2006-08-14 20:15:07)',
- 'vHex' => '0x00037D00',
- 'vLong' => '0.55 (2006-08-14 20:15:07)',
- 'vPerl' => '0.55',
- 'vShort' => '0.55',
- 'vSquid' => '0.55-fix-3328',
- 'vTeX' => 'This is PDF::API2, Version 0.55 (2006-08-14 20:15:07)',
- 'vWeb' => 'PDF::API2/0.55',
- 'vWin' => '0.55 build 3328',
+ 'vFredo' => 'PDF::API2 0.57 (fix-3328 / 2007-01-04)',
+ 'vGNU' => 'PDF::API2 0.57 (2007-01-04 18:47:06)',
+ 'vHex' => '0x00039D00',
+ 'vLong' => '0.57 (2007-01-04 18:47:06)',
+ 'vPerl' => '0.57',
+ 'vShort' => '0.57',
+ 'vSquid' => '0.57-fix-3328',
+ 'vTeX' => 'This is PDF::API2, Version 0.57 (2007-01-04 18:47:06)',
+ 'vWeb' => 'PDF::API2/0.57',
+ 'vWin' => '0.57 build 3328',
);
}
1;
@@ -36,16 +36,16 @@
=head1 VERSION
- vFredo: PDF::API2 0.55 (fix-3328 / 2006-08-14)
- vGNU: PDF::API2 0.55 (2006-08-14 20:15:07)
- vHex: 0x00037D00
- vLong: 0.55 (2006-08-14 20:15:07)
- vPerl: 0.55
- vShort: 0.55
- vSquid: 0.55-fix-3328
- vTeX: This is PDF::API2, Version 0.55 (2006-08-14 20:15:07)
- vWeb: PDF::API2/0.55
- vWin: 0.55 build 3328
+ vFredo: PDF::API2 0.57 (fix-3328 / 2007-01-04)
+ vGNU: PDF::API2 0.57 (2007-01-04 18:47:06)
+ vHex: 0x00039D00
+ vLong: 0.57 (2007-01-04 18:47:06)
+ vPerl: 0.57
+ vShort: 0.57
+ vSquid: 0.57-fix-3328
+ vTeX: This is PDF::API2, Version 0.57 (2007-01-04 18:47:06)
+ vWeb: PDF::API2/0.57
+ vWin: 0.57 build 3328
=cut
More information about the Pkg-perl-cvs-commits
mailing list