RE: Manipulating page-width / page-height
ThanX that is exactly what I need. I will check it out. I've tried to overwrite AWTRenderer etc. [ for a lot of hours :( ], but no usable result arose, because I had only the chance to scale the rendered image into my format (thats not the right way for different page geometries), for printing and print preview. ThanX also to Jeremias Maerki, but I'm not so familiar with XSLT so that I wasn't able to understand your suggestion correct. cu all Torsten Erler -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 24. April 2002 22:58 To: [EMAIL PROTECTED] Subject: Re: Manipulating page-width / page-height Torsten Erler wrote: Is there any way to invoke the width and height property of the PageMaster instance, to set this page properties from within the java code??? In my xsl template no width and height is set, but the rendered page comes with 576000x792000 mpixels. Can I manipulate the properties with my data (and if yes where!). There are a lot of properties. The easiest way is probably to use XSLT parameters. Declare global parameters in the XSL file: xsl:stylesheet xmlns:xsl=... ... xsl:param name=page-height/ xsl:param name=page-width/ and use them in the page-master xsl:template match=/ ... fo:simple-page-master master-name=... page-height={$page-height} page-width={$page-width} ... Look up details in the XSLT spec: http://www.w3.org/TR/xslt You can set values for the parameters from your Java code by using the setParameter() method of your transformer: transformer=factory.newTransformer(xsl); transformer.setParameter(page-height,29.1cm); transformer.setParameter(page-width,21.9cm); Lookup details in the JAXP documentation. 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: Manipulating page-width / page-height
If you need to set the page properties dynamically I suggest you use XSLT parameters that you will then use in your stylesheet. Your idea is probably a bit difficult. On 24.04.2002 15:07:44 Torsten Erler wrote: Hi all Is there any way to invoke the width and height property of the PageMaster instance, to set this page properties from within the java code??? In my xsl template no width and height is set, but the rendered page comes with 576000x792000 mpixels. Can I manipulate the properties with my data (and if yes where!). ThanX Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] Cheers, Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Manipulating page-width / page-height
Torsten Erler wrote: Is there any way to invoke the width and height property of the PageMaster instance, to set this page properties from within the java code??? In my xsl template no width and height is set, but the rendered page comes with 576000x792000 mpixels. Can I manipulate the properties with my data (and if yes where!). There are a lot of properties. The easiest way is probably to use XSLT parameters. Declare global parameters in the XSL file: xsl:stylesheet xmlns:xsl=... ... xsl:param name=page-height/ xsl:param name=page-width/ and use them in the page-master xsl:template match=/ ... fo:simple-page-master master-name=... page-height={$page-height} page-width={$page-width} ... Look up details in the XSLT spec: http://www.w3.org/TR/xslt You can set values for the parameters from your Java code by using the setParameter() method of your transformer: transformer=factory.newTransformer(xsl); transformer.setParameter(page-height,29.1cm); transformer.setParameter(page-width,21.9cm); Lookup details in the JAXP documentation. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]