May I suggest that you have a look at "examples/fo/basic/images.fo" in the FOP distribution? The example shows various ways to use fo:external-graphic. I'm sure you'll find the pattern you need there.
Good luck! Jeremias Maerki On 09.11.2007 22:50:23 Puppala, Kumar (LNG-CON) wrote: > Thanks for the information. I tried to use both content-height and > content-width (setting them to 'scale-to-fit') in my testcase and it > still did not work. I think there might be some issue here. Below is the > code snippet from AbstractGraphicsLayoutManager.java file: > > > > In getInlineArea() function: > > > > Line 72 onwards... > > int bpd = -1; > > int ipd = -1; > > > > The bpd and ipd values are only overwritten if > > Line 129 onwards... > > if ((scaling == EN_UNIFORM) || (cwidth == -1) || cheight == -1) > { > > if (cwidth == -1 && cheight == -1) { > > cwidth = fobj.getIntrinsicWidth(); > > cheight = fobj.getIntrinsicHeight(); > > } > > .... > > Line 164 onwards... > > if (ipd == -1) { > > ipd = cwidth; > > } > > if (bpd == -1) { > > bpd = cheight; > > } > > > > The ipd and bpd values are set as per this flow for my FO file. As such, > the values are not being scaled. We might be missing something here but > since I am not an expert in this area, any input to fix this issue will > be greatly appreciated. > > > > > > Thanks, > > Kumar Puppala > > > > -----Original Message----- > From: Andreas L Delmelle [mailto:[EMAIL PROTECTED] > Sent: Friday, November 09, 2007 2:21 PM > To: fop-users@xmlgraphics.apache.org > Subject: Re: Images not resized properly in fop 0.94 > > > > On Nov 9, 2007, at 20:08, Puppala, Kumar (LNG-CON) wrote: > > > > Hi Kumar > > > I am running into an issue with both gif and png images in fop > > > 0.94. I am trying to render a big GIF image in my PDF document. > > > Since the image does not fit in a single page, it should be > > > resized. In FOP 0.20.5, I do see the correct behavior and the image > > > is rendered properly. However in both 0.93 and 0.94 releases, the > > > image is not truncated and hence only rendered partially. I am > > > hereby attaching the FO file and the outputs from old and new fop. > > > Are there any known issues here? > > > > Yes, the behavior in FOP 0.20.5 is non-compliant. > > > > Take a look at the fo:external-graphic, and the XSL-FO Rec, more > > precisely: > > > > http://www.w3.org/TR/xsl11/#d0e22982 (Area Dimension Properties) > > > > You have no explicit (content-)width/height, so: > > > > content-width="auto" => intrinsic image width > > content-height="auto" => intrinsic image height > > height="auto" > > width="auto" > > > > => the image should not be scaled to fit the viewport, but clipped. > > > > The trick is to set content-height and/or content-width explicitly to > > "scale-to-fit". That should normally do it. > > > > Hope this helps! > > > > > > Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]