HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › General questions / FAQ › PDF Font support › Re: Re: PDF Font support
By default PD4ML converts all sizes, given in physical units to screen pixels using 72dpi as scale factor. After that it renders document as for a screen presentation.
The resulting layout is mapped to chosen paper format. The mapping scale factor may be calculated like that:
scale = (pageFormat.width – insets.left – insets.right) / htmlWidth
So you have two methods to get the desired PDF font size:
1. to play with htmlWidth value to achieve the needed scale and font sizes
2. to define all important sizes in “pt”, “in”, “cm” and to trigger protectPhysicalUnitDimensions() API method.