public class AWExporterParameter
extends net.sf.jasperreports.engine.JRExporterParameter
The following code sample demonstrates the usage of the class:
AWDocExporter exporter = new AWDocExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString()); exporter.setParameter( AWExporterParameter.OVERLAP_RESOLUTION_METHOD, AWExporterParameter.OVERLAP_RESOLUTION_METHOD_TRUNCATE_ITEMS); exporter.exportReport();
Modifier and Type | Field and Description |
---|---|
static AWExporterParameter |
CONTENT_DISPOSITION |
static AWExporterParameter |
CONTENT_TYPE |
static AWExporterParameter |
EXPORT_EMPTY_TEXTS
Parameter to determine whether to export or not empty texts.
|
static AWExporterParameter |
EXPORT_LINES
Parameter to determine whether to export lines.
|
static AWExporterParameter |
EXPORT_RECTANGLES
Parameter to determine whether to export rectangles.
|
static AWExporterParameter |
EXPORT_RECTANGLES_AS_FRAMES
Parameter to determine whether to export rectangles as frames.
|
static AWExporterParameter |
EXPORT_REPEATING_ELEMENTS |
static AWExporterParameter |
IMAGE_NAME_TEMPLATE |
static AWExporterParameter |
IMAGES_FOLDER
This constant is not supposed to be used directly.
|
static AWExporterParameter |
IMAGES_FOLDER_ALIAS |
static AWExporterParameter |
LICENSE
Parameter to set the path to a license file.
|
static AWExporterParameter |
MOVE_ELEMENTS_TO_FRAMES
Parameter to determine whether to move elements to frames.
|
static AWExporterParameter |
OVERLAP_RESOLUTION_METHOD
Parameter to determine a way to resolve overlapping items.
|
static int |
OVERLAP_RESOLUTION_METHOD_AS_IS
Specifies the AsIs Items resolution method.
|
static int |
OVERLAP_RESOLUTION_METHOD_PUSH_ITEMS
Specifies the Push Items resolution method.
|
static int |
OVERLAP_RESOLUTION_METHOD_TRUNCATE_ITEMS
Specifies the Truncate Items resolution method.
|
static AWExporterParameter |
PAGE_BREAKS
Parameter set the way page breaks are inserted into the document.
|
static int |
PAGE_BREAKS_NONE
Specifies that no page breaks will be inserted into the document.
|
static int |
PAGE_BREAKS_NORMAL
Specifies that normal (not section) page breaks will be inserted into the document.
|
static int |
PAGE_BREAKS_SECTIONS
Specifies that section breaks will be inserted into the document.
|
static AWExporterParameter |
PAGE_MARGINS
Parameter to enforce page margins.
|
static AWExporterParameter |
POSITIONED_STYLE |
static AWExporterParameter |
PRINT_LAYOUT |
static java.lang.String |
PROPERTY_CONTENT_DISPOSITION |
static java.lang.String |
PROPERTY_CONTENT_TYPE |
static java.lang.String |
PROPERTY_EXPORT_EMPTY_TEXTS
This constant is not supposed to be used directly.
|
static java.lang.String |
PROPERTY_EXPORT_LINES
This constant is not supposed to be used directly.
|
static java.lang.String |
PROPERTY_EXPORT_RECTANGLES
This constant is not supposed to be used directly.
|
static java.lang.String |
PROPERTY_EXPORT_RECTANGLES_AS_FRAMES
This constant is not supposed to be used directly.
|
static java.lang.String |
PROPERTY_EXPORT_REPEATING_ELEMENTS
This constant is not supposed to be used directly.
|
static java.lang.String |
PROPERTY_IMAGE_NAME_TEMPLATE |
static java.lang.String |
PROPERTY_IMAGES_FOLDER |
static java.lang.String |
PROPERTY_IMAGES_FOLDER_ALIAS |
static java.lang.String |
PROPERTY_LICENSE
This constant is not supposed to be used directly.
|
static java.lang.String |
PROPERTY_MOVE_ELEMENTS_TO_FRAMES
This constant is not supposed to be used directly.
|
static java.lang.String |
PROPERTY_OVERLAP_RESOLUTION_METHOD
This constant is not supposed to be used directly.
|
static java.lang.String |
PROPERTY_PAGE_BREAKS
This constant is not supposed to be used directly.
|
static java.lang.String |
PROPERTY_PAGE_MARGINS
This constant is not supposed to be used directly.
|
static java.lang.String |
PROPERTY_POSITIONED_STYLE
This constant is not supposed to be used directly.
|
static java.lang.String |
PROPERTY_PRINT_LAYOUT
This constant is not supposed to be used directly.
|
static java.lang.String |
PROPERTY_RECOGNIZE_FIELDS
This constant is not supposed to be used directly.
|
static java.lang.String |
PROPERTY_ROUND_POINTS
This constant is not supposed to be used directly.
|
static java.lang.String |
PROPERTY_SPACING_FACTOR
This constant is not supposed to be used directly.
|
static java.lang.String |
PROPERTY_USE_EXACT_ROW_HEIGHTS
This constant is not supposed to be used directly.
|
static java.lang.String |
PROPERTY_USE_EXACT_SPACINGS
This constant is not supposed to be used directly.
|
static AWExporterParameter |
RECOGNIZE_FIELDS
Parameter to control whether the text enclosed in curve brackets ({}) should be exported as Microsoft Word
fields.
|
static AWExporterParameter |
ROUND_POINTS |
static AWExporterParameter |
SPACING_FACTOR
Parameter to reduce spacing between report elements if needed.
|
static AWExporterParameter |
USE_EXACT_ROW_HEIGHTS
Parameter to determine whether to set exact row heights (for example in tables).
|
static AWExporterParameter |
USE_EXACT_SPACINGS
Parameter to determine whether to set exact spacings (for example in headings).
|
CHARACTER_ENCODING, CLASS_LOADER, END_PAGE_INDEX, FILE_RESOLVER, FILTER, FONT_MAP, HYPERLINK_PRODUCER_FACTORY, IGNORE_PAGE_MARGINS, INPUT_FILE, INPUT_FILE_NAME, INPUT_STREAM, INPUT_URL, JASPER_PRINT, JASPER_PRINT_LIST, OFFSET_X, OFFSET_Y, OUTPUT_FILE, OUTPUT_FILE_NAME, OUTPUT_STREAM, OUTPUT_STRING_BUFFER, OUTPUT_WRITER, PAGE_INDEX, PARAMETERS_OVERRIDE_REPORT_HINTS, PROGRESS_MONITOR, PROPERTY_CHARACTER_ENCODING, PROPERTY_EXPORT_PARAMETERS_OVERRIDE_REPORT_HINTS, PROPERTY_IGNORE_PAGE_MARGINS, START_PAGE_INDEX, URL_HANDLER_FACTORY
public static final AWExporterParameter LICENSE
public static final java.lang.String PROPERTY_LICENSE
public static final AWExporterParameter OVERLAP_RESOLUTION_METHOD
JasperReports reports can contain overlapping items. Faithfully converting reports with overlapping items to Microsoft Word documents can sometimes represent challenges to the system. In Flow Layout, overlapping items cannot be converted preserving their original location or size because there is no such thing as Z-order in Flow Layout. However, Aspose.Words for JasperReports tries to export such items as close to the original as possible. It offers two methods of resolving overlapping items:
The first method is used by default as it allows the preservation of the original position of report items and does not affect surrounding contents. However, it may corrupt the item's appearance. If you are not satisfied with the Truncate method, you can try the Push method.
public static final java.lang.String PROPERTY_OVERLAP_RESOLUTION_METHOD
public static final int OVERLAP_RESOLUTION_METHOD_AS_IS
public static final int OVERLAP_RESOLUTION_METHOD_PUSH_ITEMS
public static final int OVERLAP_RESOLUTION_METHOD_TRUNCATE_ITEMS
public static final AWExporterParameter EXPORT_LINES
Lines in JasperReports are often used to represent borders and other decorative elements around text. At the moment Aspose.Words for JasperReports exports reports to flow layout documents, which means they consist of "normal" inline paragraphs and tables. Flow layout does not support overlapping items and Z-order at all. Exporting lines that are placed over other items would corrupt the resulting appearance of the document.
If you need lines to be exported, set this parameter to true.
public static final java.lang.String PROPERTY_EXPORT_LINES
public static final AWExporterParameter EXPORT_RECTANGLES
Rectangles in JasperReports are often used to represent borders and other decorative elements around text. At the moment Aspose.Words for JasperReports exports reports to flow layout documents, which means they consist of "normal" inline paragraphs and tables. Flow layout does not support overlapping items and Z-order at all. Exporting rectangles that are placed over other items would corrupt the resulting appearance of the document.
If you do not need rectangles to be exported, set this parameter to false.
public static final java.lang.String PROPERTY_EXPORT_RECTANGLES
public static final AWExporterParameter EXPORT_RECTANGLES_AS_FRAMES
Rectangles in JasperReports are often used to represent borders and other decorative elements around text. At the moment Aspose.Words for JasperReports exports reports to flow layout documents, which means they consist of "normal" inline paragraphs and tables. Flow layout does not support overlapping items and Z-order at all. Exporting rectangles that are placed over other items would corrupt the resulting appearance of the document.
If you do not need rectangles to be exported as frames, set this parameter to false.
public static final java.lang.String PROPERTY_EXPORT_RECTANGLES_AS_FRAMES
public static final AWExporterParameter MOVE_ELEMENTS_TO_FRAMES
Input will be analyzed for elements overlapped with frames and those elements will be moved inside appropriate frame
If you do not need to move elements to frames, set this parameter to false.
public static final java.lang.String PROPERTY_MOVE_ELEMENTS_TO_FRAMES
public static final AWExporterParameter USE_EXACT_ROW_HEIGHTS
This will allow to use row heights that EXACTLY equals to those from input, otherwise will be used AT_LEAST row heights
If you do not need to set exact row heights, set this parameter to false.
public static final java.lang.String PROPERTY_USE_EXACT_ROW_HEIGHTS
public static final AWExporterParameter USE_EXACT_SPACINGS
This will allow to use spacings that exactly the same as from input, otherwise some optimized spacings will be used
If you need to set exact spacings, set this parameter to true.
public static final java.lang.String PROPERTY_USE_EXACT_SPACINGS
public static final AWExporterParameter EXPORT_EMPTY_TEXTS
This will allow to enable/disable exporting of empty texts
If you do not need to export empty texts, set this parameter to false.
public static final java.lang.String PROPERTY_EXPORT_EMPTY_TEXTS
public static final AWExporterParameter SPACING_FACTOR
When generating documents in flow mode, it is impossible to set the coordinates of report elements explicitly. This means that sometimes page contents may appear higher than designed and therefore be pushed to the following page. To eliminate this side effect, you may reduce spacing between report elements. If you encounter the described behaviour (the documnet contains more pages than expected), try setting the SPACING_FACTOR parameter to a value less than 1.0. Keep decreasing the value until all page contents fit corresponding pages.
public static final java.lang.String PROPERTY_SPACING_FACTOR
public static final AWExporterParameter PAGE_MARGINS
Unfortunately, at the moment JasperReports print model does not allow exporters detect page margins specified in the report design. Hence, Aspose.Words for JasperReports uses a special algorithm to work this around.
The algorithm works as follows. All page margins are set to a default value that is used by Microsoft Word when creating a new document (1 inch). If some report elements are located closer to page edges, then the corresponding page margins are reduced appropriately. That is, page margins are set to the value of 1in or less, depending on report design.
You can change the default 1in value by specifying what page margins the exporter should try to enforce. 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:
Note you can use different units of measure in the same string or omit some of margin values.
public static final java.lang.String PROPERTY_PAGE_MARGINS
public static final AWExporterParameter PAGE_BREAKS
Aspose.Words for JasperReports supports three ways page breaks are inserted between document pages:
Note that in the "normal" and "no page breaks" modes, since the generated document consists of one section, only first pair of header and footer will be exported.
public static final java.lang.String PROPERTY_PAGE_BREAKS
public static final int PAGE_BREAKS_NORMAL
public static final int PAGE_BREAKS_SECTIONS
public static final int PAGE_BREAKS_NONE
public static final AWExporterParameter RECOGNIZE_FIELDS
Aspose.Words for JasperReports provides a unique feature that allows inserting Microsoft Word fields to any point of the document. This can be used to insert page numbers that are dynamically updated as the document is being edited, TOC (table of contents), and many other things.
Once this parameter is set to true, the exporter treats any text enclosed in curve brackets ({}) as a field code and exports it appropriately. For example, the following text
Page { PAGE } of { NUMPAGES },
will contain two fields in the produced document, PAGE and NUMPAGES, whose are calculated to the current page number and the total number of pages in the document, respectively.
You can add any field arguments and switches supported by the field. For example, to insert a timestamp of document creation, insert the following text:
{ DOCPROPERTY CreateTime }
public static final java.lang.String PROPERTY_RECOGNIZE_FIELDS
public static final AWExporterParameter POSITIONED_STYLE
public static final java.lang.String PROPERTY_POSITIONED_STYLE
public static final AWExporterParameter EXPORT_REPEATING_ELEMENTS
public static final java.lang.String PROPERTY_EXPORT_REPEATING_ELEMENTS
public static final AWExporterParameter PRINT_LAYOUT
public static final java.lang.String PROPERTY_PRINT_LAYOUT
public static final AWExporterParameter ROUND_POINTS
public static final java.lang.String PROPERTY_ROUND_POINTS
public static final AWExporterParameter IMAGES_FOLDER
public static final java.lang.String PROPERTY_IMAGES_FOLDER
public static final AWExporterParameter IMAGES_FOLDER_ALIAS
public static final java.lang.String PROPERTY_IMAGES_FOLDER_ALIAS
public static final AWExporterParameter IMAGE_NAME_TEMPLATE
public static final java.lang.String PROPERTY_IMAGE_NAME_TEMPLATE
public static final AWExporterParameter CONTENT_TYPE
public static final java.lang.String PROPERTY_CONTENT_TYPE
public static final AWExporterParameter CONTENT_DISPOSITION
public static final java.lang.String PROPERTY_CONTENT_DISPOSITION