Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Iterate plural PDFs with scaled font sizes.

by aplonis (Pilgrim)
on Sep 03, 2014 at 13:28 UTC ( #1099405=perlquestion: print w/replies, xml ) Need Help??

aplonis has asked for the wisdom of the Perl Monks concerning the following question:

The Problem: I publish EPubs but some readers still clamor for PDFs, in which the font size is set in stone. I can convert them to PDF but then the font size is set in stone, too small for some, too large for others. A pain it would be to manually convert plural versions, each time resetting Calibre's base-font size only for the PDFs.

My Question: How might I, via Perl, read in a single, Calibre-generated PDF at the default base font size, and iterate an output of two additional PDFs, each of successively smaller sizes at, say, 75% and 50% of the base...or 10pt and 8pt...whatever?

  • Comment on Iterate plural PDFs with scaled font sizes.

Replies are listed 'Best First'.
Re: Iterate plural PDFs with scaled font sizes.
by roboticus (Chancellor) on Sep 03, 2014 at 17:24 UTC


    Changing the font size in a PDF file will cause you some problems unless you change the page size as well. If you don't change the page size, then you'll have to recompute the page layouts, or you'll have quite a messy PDF file.

    Since calibre is apparently generating your PDFs, I'm guessing that it does page layout at the same time. If so, I'd suggest telling it the font size to use when generating the document. (Note: I'm assuming that calibre allows you to configure the fonts for PDF file generation.)


    When your only tool is a hammer, all problems look like your thumb.

Re: Iterate plural PDFs with scaled font sizes.
by Old_Gray_Bear (Bishop) on Sep 03, 2014 at 16:30 UTC
    My Answer: Yes. My billing rate is $75/hour with an right hour minimum. If you are interested in contracting for my time, send me a private message.

    I Go Back to Sleep, Now.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1099405]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2019-07-20 03:08 GMT
Find Nodes?
    Voting Booth?

    No recent polls found