Converts a file in XSL-FO a PDF, XML, PCL o PS format.
 

1 fop.transform

<fop.transform
    type='pdf|xml|pcl|ps'
    encoding='encoding'
/>
Example

Generation of a file using a XSQL-Script and generation of the corresponding PDF, using the fop.transform tag.

Copy
<xsql-script name='fop_transform'>
    <body>
        <file.writer.open id='out1' encoding='ISO-8859-1'>
             <file name='fo_factura'/>
        </file.writer.open>
        <file.writer.println id='out1'><fo.xml />
        <fo.root>
           <fo.layout-master-set>
               <fo.simple-page-master master-name='HELLO' page-width='21.0cm' page-height='29.7cm' margin-top='0.5cm' margin-bottom='0.5cm' margin-left='0.5cm' margin-right='0.5cm'>
                   <fo.region-body margin-bottom='0.5cm' margin-top='1.5cm' />
                   <fo.region-before extent='1.5cm' precedence='true' />
                   <fo.region-after extent='0.5cm' />
               </fo.simple-page-master>
           </fo.layout-master-set>
            <!-- BEGIN PAGE SEQUENCE -->
            <fo.page-sequence force-page-count='no-force' master-reference='HELLO' initial-page-number='1'>
                <fo.flow flow-name='xsl-region-body'>
            
                       <fo.block text-align='left'>Hello world!</fo.block>
            
                </fo.flow>
            </fo.page-sequence>
        </fo.root></file.writer.println>  
       <file.writer.close id='out1' /> 
       <return>
       <file.bytes.write>
          <file name='fo_invoice.pdf' type='absolute'/>
          <file.bytes.read>
            <!-- ================================================================ -->
            <!-- HERE THE FO FILE generated by the SCRIPT IS CONVERTED TO PDF     -->
            <!--                                                                  -->
            <!-- ================================================================ -->                
            <fop.transform type='pdf'>
                <file name='fo_factura' />
            </fop.transform>
          </file.bytes.read>
        </file.bytes.write>
      </return>
    </body>
  </xsql-script>