Page Margins

You can change the default 1in value by specifying what page margins the exporter should try to enforce. Use the following parameter:

JasperReports

Java

   import com.aspose.words.jasperreports.*;
   AWDocExporter exporter = new AWDocExporter();
   exporter.setParameter(AWExporterParameter.PAGE_MARGINS, "1in;1in;0.5in;0.5in");
   exporter.exportReport();

JasperServer

XML

<bean id="aw_exportParameters" class="com.aspose.words.jasperreports.AWExportParametersBean">
    <property name="pageMargins" value="1in;1in;0.5in;0.5in"/>
</bean>

The value of the parameter is a string of the form

“left_margin;right_margin;top_margin;bottom_margin”

where the following units of measure are allowed:

  • in – inches (default, may be omitted)
  • cm – centimetres
  • mm – millimetres
  • px – pixels
  • pt – points