RE: external-graphic size
ThanX fred After many hours of work for scaling the picture right (with attention for margins and static areas etc.), now I've accidental changed the layout master set "extend" attributes of the regions: before and after as well as the top/bottom margin unit of measures from "mm" to "px" for space saving and the problem ends up in smoke. The image is scaled correct and no infinite loop occures. I think there is a rounding failure anywhere deep in the program on translation different unit of measures into pixels, which produces this failure. By Torsten -Original Message- From: fred redf [mailto:[EMAIL PROTECTED]] Sent: Montag, 29. April 2002 10:23 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: external-graphic size Hi all, I had the same prob in my project. I made a little java class (based on some code i found on the internet) that calculate the actual width of my image. I call that class inside my xsl (thru xalan java extension). Then, according to some rules, i configure width="Xcm" inside external graphic tag. Here is some example of my code : -< snip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: external-graphic size
Hi all, I had the same prob in my project. I made a little java class (based on some code i found on the internet) that calculate the actual width of my image. I call that class inside my xsl (thru xalan java extension). Then, according to some rules, i configure width="Xcm" inside external graphic tag. Here is some example of my code : in the header zone : http://www.w3.org/1999/XSL/Transform"; xmlns:fo="http://www.w3.org/1999/XSL/Format"; xmlns:java="http://xml.apache.org/xslt/java"; exclude-result-prefixes="java"> then in my xsl rule : temp\images\ Fig. : Hope this helps... Fred. --- Torsten Erler <[EMAIL PROTECTED]> a écrit : > Yes I'm using this as temporarily solution to avoid > program crashes, but > even the image is scaled into the specified size, > also if it has original > size of e.g. 10x15 pixel. This produces a unusable > chequered print-preview. > > Is there another way to force the scaling only if > the image overflows the > dimension of the page body area??? > > P.S.: I've tried to overwrite AWTRenderers > "renderImageArea(ImageArea > area)"to scale the image before painting, but it > seems to be the loop > occures before on formatting the area tree (I'll > debug this step by step, to > find the precise position). > > ThanX Torsten > > -----Original Message----- > From: J.Pietschmann [mailto:[EMAIL PROTECTED]] > Sent: Montag, 29. April 2002 01:21 > To: [EMAIL PROTECTED] > Subject: Re: external-graphic size > > > Torsten Erler wrote: > > I've a problem with external graphics, which can > be greater than the page > > size of the xsl-template. The properties > max-height and max-width doesn't > > work (not implemented). The result is an infinite > loop on rendering the > > (correctly) generated "fo"-file with the > AWTRenderer to display the > result. > > Is there a workaround for that or have I omit an > important setting > (possible > > in xsl) for a parent object. > > Try setting height and/or width on the > fo:external-graphic > element. If you specify both, the graphic may be > stretched, > of you specify only one, the aspect ratio is > conserved. > > J.Pietschmann > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, email: > [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, email: > [EMAIL PROTECTED] > ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: external-graphic size
Yes I'm using this as temporarily solution to avoid program crashes, but even the image is scaled into the specified size, also if it has original size of e.g. 10x15 pixel. This produces a unusable chequered print-preview. Is there another way to force the scaling only if the image overflows the dimension of the page body area??? P.S.: I've tried to overwrite AWTRenderers "renderImageArea(ImageArea area)"to scale the image before painting, but it seems to be the loop occures before on formatting the area tree (I'll debug this step by step, to find the precise position). ThanX Torsten -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED]] Sent: Montag, 29. April 2002 01:21 To: [EMAIL PROTECTED] Subject: Re: external-graphic size Torsten Erler wrote: > I've a problem with external graphics, which can be greater than the page > size of the xsl-template. The properties max-height and max-width doesn't > work (not implemented). The result is an infinite loop on rendering the > (correctly) generated "fo"-file with the AWTRenderer to display the result. > Is there a workaround for that or have I omit an important setting (possible > in xsl) for a parent object. Try setting height and/or width on the fo:external-graphic element. If you specify both, the graphic may be stretched, of you specify only one, the aspect ratio is conserved. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: external-graphic size
Torsten Erler wrote: > I've a problem with external graphics, which can be greater than the page > size of the xsl-template. The properties max-height and max-width doesn't > work (not implemented). The result is an infinite loop on rendering the > (correctly) generated "fo"-file with the AWTRenderer to display the result. > Is there a workaround for that or have I omit an important setting (possible > in xsl) for a parent object. Try setting height and/or width on the fo:external-graphic element. If you specify both, the graphic may be stretched, of you specify only one, the aspect ratio is conserved. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]