Converting ePub Python coding books to PDF outputs Python code far too small
I have a lot of Python programming books in ePub format, and I need to convert them to PDF format.
The ePub to PDF conversion process is generally very good. I like the fact that a good, navigable TOC is generated in the PDF.
The recurring problem is that Python code output in the converted file is always TOO SMALL. It is often SO small that the Python code is unusable, hence I just throw it away and try the conversion gain. Occasionally the PDF output conversion works, but not reliably. It seems to depend on the individual ePub book.
I need the code and non-code text to remain the same RELATIVE size as in the ePub format.
I have tried setting the "Monospace font size" output at every value from 14 to 24-point size with the Default size to 12 px. This does not seem to have any impact on upsizing the Python code font, while upsizing the text.
I have read the conversion documentation several times, but do not find any mention of how to control programming language code sizing for conversion outputs.
What can people recommend to fix this problem?
It would be great if there were separate tags for code in a book, like the <pre> tag used to encode Python code on HTML pages.
|