Processing Images for HTML output
Contents
[
Hide
]
There are 3 parameters for configuring how to process images when exporting to HTML format.
IMAGES_FOLDER sets exact system folder to save images into. Is empty by default, save to same folder when report output is located.
IMAGES_FOLDER_ALIAS sets URL
prefix for images in HTML output. Is empty by default, no prefix.
IMAGE_NAME_TEMPLATE sets how to name images. By default images are named with unique names such as “Aspose.Words.
In JasperReports:
Java
import com.aspose.words.jasperreports.*;
AWDocExporter exporter = new AWDocExporter();
exporter.setParameter(AWExporterParameter.IMAGES_FOLDER, "c:/temp/images");
exporter.setParameter(AWExporterParameter.IMAGES_FOLDER_ALIAS, "https://localhost/images");
exporter.setParameter(AWExporterParameter.IMAGE_NAME_TEMPLATE, "image");
exporter.exportReport();
In JasperServer:
XML
<bean id="aw_exportParameters" class="com.aspose.words.jasperreports.AWExportParametersBean">
<property name="imagesFolder" value="c:/temp/images"/>
<property name="imagesFolderAlias" value="https://localhost/images "/>
<property name="imageNameTemplate" value="c:/temp/images"/>
</bean>