Aspose.Words

Page Size & Orientation

By default Aspose.Words for JasperReports use page size/orientation from the input provided for export. But this can be overridden and page size/orientation can be changed in export configuration.

You can change the default values by specifying what page size/orientation the exporter should enforce. Use PAGE_SIZE and PAGE_ORIENTATION parameters for that:

JasperReports:

[Java]

 

   import com.aspose.words.jasperreports.*;

 

   AWDocExporter exporter = new AWDocExporter();

   exporter.setParameter(AWExporterParameter.PAGE_SIZE, Letter);

   exporter.setParameter(AWExporterParameter.PAGE_ORIENTATION, “Landscape”);

   exporter.exportReport();

 

 

JasperServer:

[XML]

 

<bean id="aw_exportParameters" class="com.aspose.words.jasperreports.AWExportParametersBean">

    <property name="pageSize" value="Letter"/>

    <property name="pageSize" value="Landscape"/>

</bean>

 

 

Possible page sizes are A5, A4, A3, Legal, Letter and Executive. If you will try to set some other page size(s) the default one (from exporter input) will be used. Possible page orientations are Portrait and Landscape. If you will try to set some other page orientation(s) the default one (from exporter input) will be used.