Zahidul Islam wrote:

hello
is there any way to set the page width dynamially? pls help me. in ma project i want to generate the pdf pages that will show table and the width of the pdf pages will depend on the width of the table. the width of the table is known at backend and can be given in the xml file from which the pdf will be generated. so i need a way to set the page width of pdf depending on the value given in the xml file from which the pdf is generated.
advance thanks.


I set the page-height dynamicly, and I guess you can do it the same way with the page-width.
Here is how I do it for the page-height.


My xml contains for example:
<xmldata>
<page-height>200</page-height>
</xmldata>

And my template:
 <xsl:template match="xmldata">
   <xsl:variable name="page-height">
     <xsl:value-of select="./page-height" />
   </xsl:variable>

   <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
     <fo:layout-master-set>
       <fo:simple-page-master master-name="master"
                              page-width="118mm"
                              page-height="{$page-height}mm">
        <fo:region-body />
       </fo:simple-page-master>
     </fo:layout-master-set>

Regards
Wessel van Norel


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to