# Background Image Rendering

4 messages
Open this post in threaded view
|

## Background Image Rendering

 I have been struggling with the getting a background image (jpeg) to display properly in the PDF output using fop 0.20.5 on Windows XP. I am inserting a background jpeg image ("watermark") and placing a table over the top of it.  When I view the image and table in a tool such as XSLFormatterV3.2 the size of the jpeg image is appropriate (the image is a form that basically fills in the entire 8.5in X11.0in boundary). However when I process the file in FOP the size of the JPEG image gets increased by approximately 400% such that the PDF file only contains the top left portion of my form image. Below is the command line I am using to insert the image. I was able to get the JPEG to display the correct size in the PDF output by using another program to resize the file from 1700 X 2200 pixels to 610 X 789, however the clarity of the image has gone to hell. Any guidance is appreciated. GARY LEVESQUE --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email]
Open this post in threaded view
|

## Re: Background Image Rendering

 Levesque, Gary R wrote: > over the top of it.  When I view the image and table in a tool such as > XSLFormatterV3.2 the size of the jpeg image is appropriate (the image is > a form that basically fills in the entire 8.5in X11.0in boundary). > However when I process the file in FOP the size of the JPEG image gets > increased by approximately 400% JPEG images are bitmaps. FOP renders bitmaps at a fixed resolution of 72dpi in absence of an explicit widht/height specification, which unfortunately can't be provided for background images. Any metadata in the bitmap file indicating another resolution is ignored. Your only option to get FOP to display your JPEG background as intended is to create a 72 dpi image. Alternatively, use SVG graphics. J.Pietschmann --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email]