Sizing images from html to pdf xslt

csaladores's Avatar

csaladores

29 Nov, 2010 09:39 PM

Hi,

Quick question, is there a way or a setting to change the size of the images in xslt when rendering html to pdf? Using the html2pdf xslt rendered images seem to be large than the original image.

  1. 1 Posted by Ross on 04 Mar, 2011 06:49 PM

    Ross's Avatar

    The reason images show so large in the PDF is that FOP's DPI is hardwired to 72. Images typically look better at 90 or 100 DPI. I've modified the format and placed it on Github to support custom DPI settings. Here is the entire revised format:
    https://github.com/hannonhill/Cascade-Server-XSLT/blob/master/PDF/x...

    And here is the patch to support custom DPI if you'd like to manually make the changes to your format:
    https://github.com/hannonhill/Cascade-Server-XSLT/commit/09da7e5336...

  2. Ross closed this discussion on 04 Mar, 2011 06:49 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac