HTML to PDF / DOCX / RTF Java converter library Forums PD4ML v3 Archived Forums (Read Only) PD4ML Tips & Tricks Can I pre-define font sizes in resulting PDF documents?

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #26178

    HTML-to-PDF mapping scale depends on HTML width given in screen pixels and PDF page format width (minus horizontal insets) in typographical points.

    htmlToPdfScale = ( pageFormat.width – pageInsets.left – pageInsets.right ) / htmlWidth

    The font sizes are scaled correspondingly to the entire document scale in order to keep page layout not broken.

    If you need to get a specific font size in your PDF documents, try to achieve that by “playing” with htmlWidth and horizontal PDF page inset parameter values.

    For the cases, when exact PDF objects’ dimensions are critical there is an API call protectPhysicalUnitDimensions(), which forces PD4ML to respect and to output to PDF sizes/dimensions given in pt, in, cm etc. The conversion mode sacrifices proportions between objects, whose dimensions are given in physical and screen units. It may result page layouts differ from the layouts rendered in web browsers. Use it with care.

Viewing 1 post (of 1 total)

The forum ‘PD4ML Tips & Tricks’ is closed to new topics and replies.