public class PDFXMLExtractorPlugin
extends org.imixs.workflow.engine.plugins.AbstractPlugin
The plugin is based on the Apache PDFBox project.
To activate the plugin, the BPMN event must contain the following item definition
<item name="PDFXMLExtractor">
<filename>*.xml</filename>
<report>myReport</report>
</item>
| Modifier and Type | Field and Description |
|---|---|
static String |
FILE_PATTERN_PDF |
static String |
FILE_PATTERN_XML |
static String |
PARSING_EXCEPTION |
static String |
PDFXMLEXTRACTOR |
static String |
PLUGIN_ERROR |
static String |
REPORT_ERROR |
| Constructor and Description |
|---|
PDFXMLExtractorPlugin() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
getXMLFile(org.imixs.workflow.ItemCollection document,
String file_pattern)
This method searches attached PDF files of a workitem and extracts an
embedded XML file.
|
org.imixs.workflow.ItemCollection |
run(org.imixs.workflow.ItemCollection document,
org.imixs.workflow.ItemCollection event)
This method parses the content of an attached pdf file and extracts an
embedded XML file.
|
static byte[] |
streamToByteArray(InputStream ins)
This method converts a inputStream into a byte array.
|
public static final String PDFXMLEXTRACTOR
public static final String PARSING_EXCEPTION
public static final String PLUGIN_ERROR
public static final String REPORT_ERROR
public static final String FILE_PATTERN_PDF
public static final String FILE_PATTERN_XML
public org.imixs.workflow.ItemCollection run(org.imixs.workflow.ItemCollection document,
org.imixs.workflow.ItemCollection event)
throws org.imixs.workflow.exceptions.PluginException
org.imixs.workflow.exceptions.PluginExceptionpublic static byte[] getXMLFile(org.imixs.workflow.ItemCollection document,
String file_pattern)
throws org.imixs.workflow.exceptions.PluginException
The method only returns the first embedded xml file and does not support multiple xml files embedded in one pdf file.
document - filePattern - org.imixs.workflow.exceptions.PluginExceptionpublic static byte[] streamToByteArray(InputStream ins) throws IOException
ins - IOExceptionCopyright © 2016–2020 Imixs Software Solutions GmbH. All rights reserved.