Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: PDF::API2 and the Elusive Courier Font

by rsmeineke (Initiate)
on Nov 10, 2013 at 11:35 UTC ( #1061899=note: print w/ replies, xml ) Need Help??


in reply to Re: PDF::API2 and the Elusive Courier Font
in thread [SOLVED] PDF::API2 and the Elusive Courier Font

Thanks to all who responded to my initial inquiry. A quick note of follow-up.

"convert" seems to think Courier is installed:

robertm@sys76:~$ convert -list font |grep -i courier Font: Courier family: Courier Font: Courier-Bold family: Courier Font: Courier-BoldOblique family: Courier Font: Courier-Oblique family: Courier Font: Courier-10-Pitch-Bold family: Courier 10 Pitch Font: Courier-10-Pitch-Bold-Italic family: Courier 10 Pitch Font: Courier-10-Pitch-Italic family: Courier 10 Pitch Font: Courier-10-Pitch-Regular family: Courier 10 Pitch robertm@sys76:~$

And here is the weird thing. When I used PDF::Create in a similar script all four versions of Courier are rendered perfectly. So PDF::Create is the obvious solution to this particular issue. I just wish I could figure out my problem with PDF::API2. It's starting to feel like a pernicious permissions problem, or similar. Puzzling.

Thanks again, Robert M.


Comment on Re^2: PDF::API2 and the Elusive Courier Font
Download Code
Re^3: PDF::API2 and the Elusive Courier Font
by kschwab (Priest) on Nov 10, 2013 at 14:22 UTC

    I checked the source, and the $pdf->corefont() method pulls from 14 built-in fonts in the module itself...where their data is encoded in .pm files, here:

    /the_module_install_dir/lib/PDF/API2/Resource/Font/

    So, it's not looking at system installed fonts at all.Your issue is within the module itself.

    Since your code is working for others, I would guess you've got a borked installation of the module. You could find try the ttffont() or psfont() method instead, assuming you have ttf or pfm files for the desired fonts around. The convert utility shows the location of these. Or perhaps try reinstalling the module?

      I thought that is what I had gleaned from the source. This is just weird.

      I sudo apt-get purged then sudo apt-get installed which installed the 2.019 version of the package. Still no Courier. Purged again then installed from the source which is version 2.020. Still no Courier.

      I even went so far as to grab a year 2007 version of the Courier.pm file from the old source on CPAN .... no Courier! All my file and directory permissions look reachable. It has got to be something funky about this Linux Mint 15 install.

      I really should quit obsessing about this but I hate not being able to solve a good mystery!

      Thanks so much for your time, Robert M.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1061899]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2014-12-27 10:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls