Skip Menu |

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

Report information
The Basics
Id: 108205
Status: resolved
Priority: 0/
Queue: PDF-Create

People
Owner: MANWAR [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 1.15
  • 1.19
  • 1.21
Fixed in: 1.26



Subject: BaseFont "Symbol" is not accepted anymore
An application of mine using PDF::Create started to fail with this error: # got: 'PDF::Create.pm - font(): Received invalid value [Symbol] for key [BaseFont] at /home/e/eserte/src/bbbike/t/../BBBikeDraw/PDF.pm line 152. With PDF::Create 1.10 it worked fine. Probably "Symbol" should be accepted here, and probably the Encoding "Symbol" should also be accepted.
Hi Slaven, As per the pod document, PDF::Create v1.10, "The Symbol or ZapfDingbats fonts are not supported in this version.". You don't get error in v1.10 because there is no check done. In PDF::Create v1.11 or above, check is added and hence you get the error. I don't know if this should be added to the acceptable value. I will need to investigate further on this part. Many Thanks. Best Regards, Mohammad S Anwar
On 2015-10-30 14:18:57, MANWAR wrote: Show quoted text
> Hi Slaven, > > As per the pod document, PDF::Create v1.10, "The Symbol or > ZapfDingbats fonts are not supported in this version.". You don't get > error in v1.10 because there is no check done. > > In PDF::Create v1.11 or above, check is added and hence you get the > error. I don't know if this should be added to the acceptable value. I > will need to investigate further on this part.
I am using $symbolfont = $self->{PDF}->font('Subtype' => 'Type1', 'Encoding' => 'Symbol', 'BaseFont' => 'Symbol' ); since 2004 (that is, PDF::Create 0.01) and it simply works.
On 2015-11-24 16:00:56, SREZIC wrote: Show quoted text
> On 2015-10-30 14:18:57, MANWAR wrote:
> > Hi Slaven, > > > > As per the pod document, PDF::Create v1.10, "The Symbol or > > ZapfDingbats fonts are not supported in this version.". You don't get > > error in v1.10 because there is no check done. > > > > In PDF::Create v1.11 or above, check is added and hence you get the > > error. I don't know if this should be added to the acceptable value. I > > will need to investigate further on this part.
> > I am using > > $symbolfont = $self->{PDF}->font('Subtype' => 'Type1', > 'Encoding' => 'Symbol', > 'BaseFont' => 'Symbol' > ); > > since 2004 (that is, PDF::Create 0.01) and it simply works.
What's indeed missing is a width mapping for the Symbol font, so string_width does not work here (but this was not relevant in my application).
On 2015-11-24 16:18:33, SREZIC wrote: Show quoted text
> On 2015-11-24 16:00:56, SREZIC wrote:
> > On 2015-10-30 14:18:57, MANWAR wrote:
> > > Hi Slaven, > > > > > > As per the pod document, PDF::Create v1.10, "The Symbol or > > > ZapfDingbats fonts are not supported in this version.". You don't > > > get > > > error in v1.10 because there is no check done. > > > > > > In PDF::Create v1.11 or above, check is added and hence you get the > > > error. I don't know if this should be added to the acceptable > > > value. I > > > will need to investigate further on this part.
> > > > I am using > > > > $symbolfont = $self->{PDF}->font('Subtype' => 'Type1', > > 'Encoding' => 'Symbol', > > 'BaseFont' => 'Symbol' > > ); > > > > since 2004 (that is, PDF::Create 0.01) and it simply works.
> > What's indeed missing is a width mapping for the Symbol font, so > string_width does not work here (but this was not relevant in my > application).
But it might be possible to create a suitable metrics module using https://metacpan.org/source/GAAS/Font-AFM-1.20/make_metrics , a Symbol.afm file and probably some tweaking for the different encoding.
On 2015-10-30 14:18:57, MANWAR wrote: Show quoted text
> Hi Slaven, > > As per the pod document, PDF::Create v1.10, "The Symbol or > ZapfDingbats fonts are not supported in this version.". You don't get > error in v1.10 because there is no check done. > > In PDF::Create v1.11 or above, check is added and hence you get the > error. I don't know if this should be added to the acceptable value. I > will need to investigate further on this part. > > Many Thanks. > > Best Regards, > Mohammad S Anwar
-> https://github.com/Manwar/pdf-create/pull/9
Resolved, thanks to PR from Slaven.