Thank you everyone for your help. I was able to increase the resolution with FopFactory.setSourceResolution() to get it to the proper size.
Sam On Wed, Jun 24, 2009 at 3:18 AM, Pascal SANCHO <[email protected]>wrote: > Sam Fuqua a écrit : > >> Hi Andreas, >> >> I'm quite sure that it has an embedded resolution of 72dpi. I opened it >> in GIMP, and that was the resolution that I was given. >> If it does turn out to be different, then I will either resize it or try >> to find another way of embedding the image >> >> Thanks >> >> Sam >> >> On Tue, Jun 23, 2009 at 2:06 PM, Andreas Delmelle < >> [email protected] <mailto:[email protected]>> wrote: >> >> On 23 Jun 2009, at 18:09, Sam Fuqua wrote: >> >> Hi Sam >> >> >> I'm trying to render a PDF that uses a 72dpi gif as the >> background-image in the region-before. The image is >> considerably smaller than the size of the region and so I have >> "no-repeat" in use. >> When the PDF is returned, the image is stretched to the point >> that a 500 pixel wide image (which should fit with no issues) >> is being cut off on both ends as well as dramatically reducing >> the image quality. >> >> >> I think this may be expected, as XSL-FO does not have any >> properties related to scaling of the background image. Are you >> absolutely sure the GIF has an embedded resolution of 72dpi? (I >> have run into image viewers that simply show a default of 72dpi if >> they do not succeed in extracting the image's native resolution) >> If not, that may be the cause: if the native resolution of the >> image is significantly higher than 72dpi, the picture will appear >> stretched. >> >> >> Is there a setting I need to change on the FOP so that it does >> not distort my background image? >> If not, what recourse can I take to keep the image in? >> >> >> The usually suggested workaround (for a page-background) is to >> insert the image in the FO as a fo:external-graphic in one of the >> generally unused side-regions (region-start/region-end). Using a >> fo:external-graphic allows to control scaling via the width/height >> and content-width/content-height properties. >> >> >> HTH! >> >> Andreas >> >> >> -- >> Sam Fuqua >> > Hi, > AFAICK, there is no place in GIF file structure for setting resolution or > actual size. > Only size in pixels is set. > Read Compuserve spec for further details, (zipped files downloadable > here...) > http://www.wotsit.org/list.asp?page=2&fc=1&search=&al= > > In such case, FOP considers the default resolution, depending on what you > have in your fop.xconf file. > Can you verify that point? > > For a 72dpi resol, your 500px width image should be 6.9in (or 176.4mm). > Consider also that the available width in your region-before is equal to > page-width minus margins and minus extents of start and end-regions (if > precedence property is unchanged) > > HTH, > Pascal > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Sam Fuqua ΣΝ ΘΗ 454
