#27360

If an tag has no height/width attributes, PD4ML uses the original pixel dimensions of the image.

If the image does not fit PDF page width, you need to adjust HTML-to-PDF scaling factor.

HTML->PDF conversion is performed in two steps: HTML rendering – it uses htmlWidth parameter (aka screenWidth in PD4ML JSP taglib) as virtual web browser frame width, and PDF output – it maps the htmlWidth to the horizontal width of choosen paper format.

If a particular image does not fit horizontally PDF page, that means, the image is wider than htmlWidth.

In the case you have two options:

  • increase htmlWidth value (default is 640)
  • scale down the image with height and width attributes of tag