Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #26261

    We have a strange issue where a customer generates a PDF on their computer and the font size comes out larger (14pt) than it does when we generate the exact same html on our computers (12pt). Anyone have any clue what could cause this?


    PD4ML renders entire HTML layout based on screen pixels dimensions. If any sizes are specified in physical units, it converts pt, mm, in values to screen pixels (assuming 72dpi resolution).

    After the layout is ready, it maps it to the choosen paper format. The HTML-to-PDF scale can be calculated like that: scale = (paperFormat.width – insets.left – insets.right)/htmlWidth.

    You’ve got two ways to fix the sizing problem you faced with:

    • increase htmlWidth conversion parameter value until the resulting font sizes come 12pt.
    • trigger pd4ml.protectPhysicalUnitDimensions() PD4ML API method. The approach has disadvantages: scale disproportion among elements, whose sizes specified with physical units and whose sizes specified in screen pixels.
Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.