Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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.

Replies are listed 'Best First'.
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?
[RonW]: Tunnel FTP through stunnel?
[james28909]: i guess i should have done it in perl. i bet it woulnt have taken me 5 hours to figure out haha
[choroba]: In the end, I was able to upgrade Perl from 5.8.3 to 5.22 and install Net::SFTP::Foreign , at least for the task involved
[james28909]: what would be the best way to capture that stream with perl? ffmpeg args -rtp rtp://127.0.0.1?
[LanX]: if I was forced to talk about all security risks I encountered oO
[james28909]: if i did that with ffmpeg, i could then listen on the port with perl right?
[LanX]: one of my clients filtered a menu linking to Web pages according to user rights. .. but he didn't secure the access to those unlisted pages

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2017-05-22 21:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?