Skip Menu |

This queue is for tickets about the PDF-Reuse CPAN distribution.

Report information
The Basics
Id: 123564
Status: open
Priority: 0/
Queue: PDF-Reuse

People
Owner: Nobody in particular
Requestors: TPLA [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Making TrueType text more useful (patch incl.)
The support for TrueType fonts by PDF::Reuse would be a lot more useful when the output's text was searchable/copyable/extractable. This can easily be had by supplying the "ToUnicode" option to Text::PDF::TTFont0->new() which initiates the creation of a suitable mapping object. Note that this functionality of Text::PDF::TTFont0 is broken at present (2017-11-08) and requires the patch I submitted today: https://rt.cpan.org/Ticket/Display.html?id=123562 As for Reuse.pm, simply add the symbol to the options hash when instantiating a TTfont0 object: --- C:/temp/PDF-Reuse-0.39/lib/PDF/Reuse.pm 2016-09-27 17:48:32.000000000 +0200 +++ C:/temp/Reuse.pm 2017-11-08 15:28:17.784186500 +0100 @@ -1487,6 +1487,7 @@ $self->{filename}, $self->{fontAbbr}, -subset => $self->{subset}, + ToUnicode => 1 ); $self->{ttfont}->{' subvec'} = '';
On Wed Nov 08 09:45:45 2017, TPLA wrote: Show quoted text
> The support for TrueType fonts by PDF::Reuse would be a lot more > useful when the output's text was searchable/copyable/extractable. > > This can easily be had by supplying the "ToUnicode" option to > Text::PDF::TTFont0->new() which initiates the creation of a suitable > mapping object. > > Note that this functionality of Text::PDF::TTFont0 is broken at > present (2017-11-08) and requires the patch I submitted today: > > https://rt.cpan.org/Ticket/Display.html?id=123562 > > As for Reuse.pm, simply add the symbol to the options hash when > instantiating a TTfont0 object: > > --- C:/temp/PDF-Reuse-0.39/lib/PDF/Reuse.pm 2016-09-27 > 17:48:32.000000000 +0200 > +++ C:/temp/Reuse.pm 2017-11-08 15:28:17.784186500 +0100 > @@ -1487,6 +1487,7 @@ > $self->{filename}, > $self->{fontAbbr}, > -subset => $self->{subset}, > + ToUnicode => 1 > ); > $self->{ttfont}->{' subvec'} = '';
Did the companion patch every make it into Text::PDF? Kind regards, Chris