When publishing XML content (DITA, DocBook, etc.), images are sometimes scaled up in the PDF outputs but are displayed perfectly in the HTML (or WebHelp) output.
PDF output from XML content is obtained by first obtaining an intermediary XML format called XSL-FO and then applying an XSL-FO processor to it to obtain the PDF. This stretching problem is caused by the fact that all XSL-FO processors take into account the DPI (dots-per-inch) resolution when computing the size of the rendered image.
<external-graphic> tag, then these dimensions are used. This means
that if in the XML (DITA, DocBook, etc.) you set explicit dimensions to the image
they will be used as such in the PDF output.<source-resolution> and
<target-resolution>. The values set to those elements can be
increased (usually a DPI value of 110 or 120 should render the image in PDF the same
as in the HTML output).
This allows you to control the image resolution from the configuration file for all referenced images.