r9548 - in /trunk/libpdf-api2-perl: ./ debian/ examples/ lib/PDF/ lib/PDF/API2/ lib/PDF/API2/Basic/PDF/ lib/PDF/API2/Resource/CIDFont/ lib/PDF/API2/Resource/CIDFont/TrueType/ lib/PDF/API2/Resource/Font/
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Sat Nov 17 21:40:28 UTC 2007
Author: gregoa-guest
Date: Sat Nov 17 21:40:28 2007
New Revision: 9548
URL: http://svn.debian.org/wsvn/?sc=1&rev=9548
Log:
New upstream release.
Added:
trunk/libpdf-api2-perl/lib/PDF/API2/Resource/Font/neTrueType.pm
- copied unchanged from r9547, branches/upstream/libpdf-api2-perl/current/lib/PDF/API2/Resource/Font/neTrueType.pm
Modified:
trunk/libpdf-api2-perl/MANIFEST
trunk/libpdf-api2-perl/META.yml
trunk/libpdf-api2-perl/debian/changelog
trunk/libpdf-api2-perl/examples/022_truefonts_diacrits_utf8
trunk/libpdf-api2-perl/lib/PDF/API2.pm
trunk/libpdf-api2-perl/lib/PDF/API2/Basic/PDF/File.pm
trunk/libpdf-api2-perl/lib/PDF/API2/Resource/CIDFont/TrueType.pm
trunk/libpdf-api2-perl/lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm
trunk/libpdf-api2-perl/lib/PDF/API2/Version.pm
Modified: trunk/libpdf-api2-perl/MANIFEST
URL: http://svn.debian.org/wsvn/trunk/libpdf-api2-perl/MANIFEST?rev=9548&op=diff
==============================================================================
--- trunk/libpdf-api2-perl/MANIFEST (original)
+++ trunk/libpdf-api2-perl/MANIFEST Sat Nov 17 21:40:28 2007
@@ -52,6 +52,7 @@
lib/PDF/API2/Resource/XObject/Form/BarCode/int2of5.pm
lib/PDF/API2/Resource/Font/BdFont.pm
lib/PDF/API2/Resource/Font/CoreFont.pm
+lib/PDF/API2/Resource/Font/neTrueType.pm
lib/PDF/API2/Resource/Font/Postscript.pm
lib/PDF/API2/Resource/Font/SynFont.pm
lib/PDF/API2/Resource/Font/CoreFont/bankgothic.pm
Modified: trunk/libpdf-api2-perl/META.yml
URL: http://svn.debian.org/wsvn/trunk/libpdf-api2-perl/META.yml?rev=9548&op=diff
==============================================================================
--- trunk/libpdf-api2-perl/META.yml (original)
+++ trunk/libpdf-api2-perl/META.yml Sat Nov 17 21:40:28 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.66
+version: 0.68
version_from: lib/PDF/API2/Version.pm
installdirs: site
requires:
Modified: trunk/libpdf-api2-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libpdf-api2-perl/debian/changelog?rev=9548&op=diff
==============================================================================
--- trunk/libpdf-api2-perl/debian/changelog (original)
+++ trunk/libpdf-api2-perl/debian/changelog Sat Nov 17 21:40:28 2007
@@ -1,3 +1,9 @@
+libpdf-api2-perl (0.68-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- gregor herrmann <gregor+debian at comodo.priv.at> Sat, 17 Nov 2007 22:38:46 +0100
+
libpdf-api2-perl (0.66-1) unstable; urgency=low
[ Damyan Ivanov ]
Modified: trunk/libpdf-api2-perl/examples/022_truefonts_diacrits_utf8
URL: http://svn.debian.org/wsvn/trunk/libpdf-api2-perl/examples/022_truefonts_diacrits_utf8?rev=9548&op=diff
==============================================================================
--- trunk/libpdf-api2-perl/examples/022_truefonts_diacrits_utf8 (original)
+++ trunk/libpdf-api2-perl/examples/022_truefonts_diacrits_utf8 Sat Nov 17 21:40:28 2007
@@ -60,7 +60,7 @@
print STDERR "\n$fn\n";
- my $font=$pdf->ttfont($fn, -encode => $encoding);
+ my $font=$pdf->ttfont($fn, -encode => $encoding, -kern=>1);
$font->data->{nosubset}=1;
if(1)
{
Modified: trunk/libpdf-api2-perl/lib/PDF/API2.pm
URL: http://svn.debian.org/wsvn/trunk/libpdf-api2-perl/lib/PDF/API2.pm?rev=9548&op=diff
==============================================================================
--- trunk/libpdf-api2-perl/lib/PDF/API2.pm (original)
+++ trunk/libpdf-api2-perl/lib/PDF/API2.pm Sat Nov 17 21:40:28 2007
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: API2.pm,v 2.11 2007/09/18 22:29:31 areibens Exp $
+# $Id: API2.pm,v 2.14 2007/11/16 19:30:31 areibens Exp $
#
#=======================================================================
@@ -37,7 +37,7 @@
use vars qw( $VERSION $seq @FontDirs );
- ($VERSION) = sprintf '%i.%03i', split(/\./,('$Revision: 2.11 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2007/09/18 22:29:31 $
+ ($VERSION) = sprintf '%i.%03i', split(/\./,('$Revision: 2.14 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2007/11/16 19:30:31 $
@FontDirs = ( (map { "$_/PDF/API2/fonts" } @INC),
qw[ /usr/share/fonts /usr/local/share/fonts c:/windows/fonts c:/winnt/fonts ] );
@@ -66,6 +66,7 @@
use PDF::API2::Resource::Font::Postscript;
use PDF::API2::Resource::Font::BdFont;
use PDF::API2::Resource::Font::SynFont;
+ use PDF::API2::Resource::Font::neTrueType;
use PDF::API2::Resource::CIDFont::TrueType;
use PDF::API2::Resource::CIDFont::CJKFont;
use PDF::API2::Resource::UniFont;
@@ -997,7 +998,7 @@
if($index==0) {
$page=PDF::API2::Page->new($self->{pdf},$self->{pages});
} else {
- $page=PDF::API2::Page->new($self->{pdf},$self->{pages},$index);
+ $page=PDF::API2::Page->new($self->{pdf},$self->{pages},$index-1);
}
$page->{' apipdf'}=$self->{pdf};
$page->{' api'}=$self;
@@ -1726,6 +1727,8 @@
'-dokern' ... enables kerning if data is available.
+ '-noembed' ... disables embedding the fontfile.
+
=cut
sub ttfont {
@@ -1733,6 +1736,19 @@
$file=_findFont($file);
my $obj=PDF::API2::Resource::CIDFont::TrueType->new_api($self,$file,%opts);
+
+ $self->resource('Font',$obj->name,$obj,$self->{reopened});
+
+ $self->{pdf}->out_obj($self->{pages});
+ $obj->tounicodemap if($opts{-unicodemap}==1);
+ return($obj);
+}
+
+sub nettfont {
+ my ($self,$file,%opts)=@_;
+
+ $file=_findFont($file);
+ my $obj=PDF::API2::Resource::Font::neTrueType->new_api($self,$file,%opts);
$self->resource('Font',$obj->name,$obj,$self->{reopened});
@@ -2540,6 +2556,15 @@
=head1 HISTORY
$Log: API2.pm,v $
+ Revision 2.14 2007/11/16 19:30:31 areibens
+ added -noembed option
+
+ Revision 2.13 2007/11/14 23:01:32 areibens
+ fixed relative page insert
+
+ Revision 2.12 2007/11/14 22:49:49 areibens
+ added non-embedded truetype font (8-bit only) support
+
Revision 2.11 2007/09/18 22:29:31 areibens
added -printscalingnone option
Modified: trunk/libpdf-api2-perl/lib/PDF/API2/Basic/PDF/File.pm
URL: http://svn.debian.org/wsvn/trunk/libpdf-api2-perl/lib/PDF/API2/Basic/PDF/File.pm?rev=9548&op=diff
==============================================================================
--- trunk/libpdf-api2-perl/lib/PDF/API2/Basic/PDF/File.pm (original)
+++ trunk/libpdf-api2-perl/lib/PDF/API2/Basic/PDF/File.pm Sat Nov 17 21:40:28 2007
@@ -5,7 +5,7 @@
# | __/| |_| | _| _ _ / ___ \| __/| | / __/
# |_| |____/|_| (_) (_) /_/ \_\_| |___| |_____|
#
-# A Perl Module Chain to faciliate the Creation and Modification
+# A Perl Module Chain o faciliae he Creaion and Modificaion
# of High-Quality "Portable Document Format (PDF)" Files.
#
#=======================================================================
@@ -23,7 +23,7 @@
# This specific module is licensed under the Perl Artistic License.
#
#
-# $Id: File.pm,v 2.8 2007/09/26 19:50:14 areibens Exp $
+# $Id: File.pm,v 2.9 2007/11/03 20:31:53 areibens Exp $
#
#=======================================================================
package PDF::API2::Basic::PDF::File;
@@ -201,7 +201,7 @@
no warnings qw[ deprecated recursion uninitialized ];
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 2.8 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2007/09/26 19:50:14 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 2.9 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2007/11/03 20:31:53 $
#IMPORTED INTO PDF::API2
@@ -309,12 +309,12 @@
{
$fh->seek($end - 16*$eoff, 0);
$fh->read($buf, 16*$eoff);
- if ($buf =~ m/startxref$cr\s*\d+$cr\%\%eof.*?/oi)
+ if ($buf =~ m/startxref($cr|\s*)\d+($cr|\s*)\%\%eof.*?/oi)
{
last;
}
}
- if ($buf !~ m/startxref$cr\s*([0-9]+)$cr\%\%eof.*?/oi)
+ if ($buf !~ m/startxref[^\d]+([0-9]+)($cr|\s*)\%\%eof.*?/oi)
{ die "Malformed PDF file $fname"; }
$xpos = $1;
Modified: trunk/libpdf-api2-perl/lib/PDF/API2/Resource/CIDFont/TrueType.pm
URL: http://svn.debian.org/wsvn/trunk/libpdf-api2-perl/lib/PDF/API2/Resource/CIDFont/TrueType.pm?rev=9548&op=diff
==============================================================================
--- trunk/libpdf-api2-perl/lib/PDF/API2/Resource/CIDFont/TrueType.pm (original)
+++ trunk/libpdf-api2-perl/lib/PDF/API2/Resource/CIDFont/TrueType.pm Sat Nov 17 21:40:28 2007
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: TrueType.pm,v 2.2 2007/10/23 07:45:49 areibens Exp $
+# $Id: TrueType.pm,v 2.3 2007/11/16 19:27:32 areibens Exp $
#
#=======================================================================
package PDF::API2::Resource::CIDFont::TrueType;
@@ -50,7 +50,7 @@
@ISA = qw( PDF::API2::Resource::CIDFont );
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 2.2 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2007/10/23 07:45:49 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 2.3 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2007/11/16 19:27:32 $
}
no warnings qw[ deprecated recursion uninitialized ];
@@ -88,10 +88,13 @@
$de->{'FontDescriptor'} = $des;
$de->{'Subtype'} = PDFName($self->iscff ? 'CIDFontType0' : 'CIDFontType2');
- $de->{'BaseFont'} = PDFName(pdfkey().'+'.($self->fontname).'~'.time());
+ ## $de->{'BaseFont'} = PDFName(pdfkey().'+'.($self->fontname).'~'.time());
+ $de->{'BaseFont'} = PDFName($self->fontname);
$de->{'DW'} = PDFNum($self->missingwidth);
- $des->{$self->data->{iscff} ? 'FontFile3' : 'FontFile2'}=$ff;
-
+ if($opts{-noembed} != 1)
+ {
+ $des->{$self->data->{iscff} ? 'FontFile3' : 'FontFile2'}=$ff;
+ }
unless($self->issymbol) {
$self->encodeByName($opts{-encode});
$self->data->{encode}=$opts{-encode};
@@ -241,6 +244,9 @@
=head1 HISTORY
$Log: TrueType.pm,v $
+ Revision 2.3 2007/11/16 19:27:32 areibens
+ fixed -noembed option
+
Revision 2.2 2007/10/23 07:45:49 areibens
fixed width encoding for wrong advance codes
Modified: trunk/libpdf-api2-perl/lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm
URL: http://svn.debian.org/wsvn/trunk/libpdf-api2-perl/lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm?rev=9548&op=diff
==============================================================================
--- trunk/libpdf-api2-perl/lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm (original)
+++ trunk/libpdf-api2-perl/lib/PDF/API2/Resource/CIDFont/TrueType/FontFile.pm Sat Nov 17 21:40:28 2007
@@ -27,7 +27,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: FontFile.pm,v 2.3 2007/05/07 20:31:21 areibens Exp $
+# $Id: FontFile.pm,v 2.5 2007/11/16 19:27:32 areibens Exp $
#
#=======================================================================
package PDF::API2::Resource::CIDFont::TrueType::FontFile;
@@ -48,7 +48,7 @@
@ISA = qw( PDF::API2::Basic::PDF::Dict );
- ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 2.3 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2007/05/07 20:31:21 $
+ ( $VERSION ) = sprintf '%i.%03i', split(/\./,('$Revision: 2.5 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2007/11/16 19:27:32 $
$cmap={};
}
no warnings qw[ recursion uninitialized ];
@@ -472,6 +472,7 @@
$self->{' font'}=$font;
$self->{' data'}=$data;
+ $data->{noembed} = $opts{-noembed}==1 ? 1 : 0;
$data->{iscff} = (defined $font->{'CFF '}) ? 1 : 0;
$self->{Subtype}=PDFName('Type1C') if($data->{iscff});
@@ -504,7 +505,14 @@
}
$data->{apiname}=$data->{fontname};
- $data->{apiname}=~s/[^A-Za-z0-9]+/ /og;
+if(0)
+{
+ $data->{apiname}=~s/[^A-Za-z0-9]+/ /og;
+}
+else
+{
+ $data->{apiname}=~s/\s+//og;
+}
$data->{apiname}=join('',map { $_=~s/[^A-Za-z0-9]+//og; $_=ucfirst(lc(substr($_,0,2))); $_; } split(/\s+/,$data->{apiname}));
$data->{fontname}=~s/[\x00-\x1f\s]//og;
@@ -636,12 +644,22 @@
$data->{kern}=read_kern_table($font,$data->{upem},$self);
delete $data->{kern} unless(defined $data->{kern});
+if(0)
+{
$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;
-
+}
+else
+{
+ $data->{fontname}=~s/\s+//og;
+ $data->{fontfamily}=~s/\s+//og;
+ $data->{apiname}=~s/\s+//og;
+ $data->{altname}=~s/\s+//og;
+ $data->{subname}=~s/\s+//og;
+}
$self->subsetByCId(0);
return($self,$data);
@@ -702,13 +720,16 @@
}
}
- $self->{' stream'} = "";
- my $ffh;
- CORE::open($ffh, '+>', \$self->{' stream'});
- binmode($ffh,':raw');
- $f->out($ffh, 'cmap', 'cvt ', 'fpgm', 'glyf', 'head', 'hhea', 'hmtx', 'loca', 'maxp', 'prep');
- $self->{'Length1'}=PDFNum(length($self->{' stream'}));
- CORE::close($ffh);
+ if($self->data->{noembed} != 1)
+ {
+ $self->{' stream'} = "";
+ my $ffh;
+ CORE::open($ffh, '+>', \$self->{' stream'});
+ binmode($ffh,':raw');
+ $f->out($ffh, 'cmap', 'cvt ', 'fpgm', 'glyf', 'head', 'hhea', 'hmtx', 'loca', 'maxp', 'prep');
+ $self->{'Length1'}=PDFNum(length($self->{' stream'}));
+ CORE::close($ffh);
+ }
}
$self->SUPER::outobjdeep($fh, $pdf, %opts);
@@ -726,6 +747,12 @@
=head1 HISTORY
$Log: FontFile.pm,v $
+ Revision 2.5 2007/11/16 19:27:32 areibens
+ fixed -noembed option
+
+ Revision 2.4 2007/11/14 20:46:37 areibens
+ added noembed option
+
Revision 2.3 2007/05/07 20:31:21 areibens
fix subsetting
Modified: trunk/libpdf-api2-perl/lib/PDF/API2/Version.pm
URL: http://svn.debian.org/wsvn/trunk/libpdf-api2-perl/lib/PDF/API2/Version.pm?rev=9548&op=diff
==============================================================================
--- trunk/libpdf-api2-perl/lib/PDF/API2/Version.pm (original)
+++ trunk/libpdf-api2-perl/lib/PDF/API2/Version.pm Sat Nov 17 21:40:28 2007
@@ -9,14 +9,14 @@
package PDF::API2::Version;
BEGIN {
use vars qw( $VERSION %CVersion );
- $VERSION = '0.66';
+ $VERSION = '0.68';
%CVersion = (
- 'vFredo' => 'PDF::API2 0.66',
- 'vHex' => '0x00042000',
- 'vLong' => '0.66',
- 'vPerl' => '0.66',
- 'vShort' => '0.66',
- 'vWeb' => 'PDF::API2/0.66',
+ 'vFredo' => 'PDF::API2 0.68',
+ 'vHex' => '0x00044000',
+ 'vLong' => '0.68',
+ 'vPerl' => '0.68',
+ 'vShort' => '0.68',
+ 'vWeb' => 'PDF::API2/0.68',
);
}
1;
@@ -32,12 +32,12 @@
=head1 VERSION
- vFredo: PDF::API2 0.66
- vHex: 0x00042000
- vLong: 0.66
- vPerl: 0.66
- vShort: 0.66
- vWeb: PDF::API2/0.66
+ vFredo: PDF::API2 0.68
+ vHex: 0x00044000
+ vLong: 0.68
+ vPerl: 0.68
+ vShort: 0.68
+ vWeb: PDF::API2/0.68
=cut
More information about the Pkg-perl-cvs-commits
mailing list