Class AsposePdfTemplateProcessor
java.lang.Object
com.flowable.template.engine.impl.processor.DocumentTemplateProcessor
com.flowable.template.engine.impl.processor.AsposePdfTemplateProcessor
- All Implemented Interfaces:
TemplateProcessor
A
TemplateProcessor
using the Aspose Document
.-
Field Summary
Fields inherited from class com.flowable.template.engine.impl.processor.DocumentTemplateProcessor
OUTPUT_TYPE_PDF, OUTPUT_TYPE_WORD, supportedContentType, templateResourceResolver
-
Constructor Summary
ConstructorDescriptionAsposePdfTemplateProcessor
(TemplateResourceResolver templateResourceResolver) -
Method Summary
Modifier and TypeMethodDescriptionprotected ContentItem
createProcessorContentItem
(ContentService contentService, String outputDocumentName, String outputDocumentType) protected byte[]
getAsByteArray
(com.aspose.pdf.Document doc) protected int
getChoiceIndex
(Object varValue, com.aspose.pdf.ChoiceField choiceField) protected String
getDocumentName
(Map<String, Object> payload) protected String
getFieldExpression
(com.aspose.pdf.Field field) protected Iterable<com.aspose.pdf.Field>
getSupportedFields
(com.aspose.pdf.Form pdfForm) protected com.aspose.pdf.Document
getTemplateDocument
(TemplateHolder templateHolder) protected boolean
isExpression
(String fieldExpression) protected boolean
isOptionField
(com.aspose.pdf.Field field) protected byte[]
processDocument
(TemplateHolder templateHolder, ExpressionManager expressionManager, VariableContainer variableContainer) processTemplate
(TemplateHolder templateHolder, Map<String, Object> payload, Map<String, Object> templateProcessingSettings) Processes a template given by its definition which might have been loaded through theTemplateRepositoryService
.Methods inherited from class com.flowable.template.engine.impl.processor.DocumentTemplateProcessor
canRender, createContentItem, getContentInputStream, getContentService, getExpressionManager, getFromPayloadOrDefault, getVariableContainer, isContentItemGenerationEnabled
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.flowable.template.api.processor.TemplateProcessor
processTemplate
-
Constructor Details
-
AsposePdfTemplateProcessor
-
-
Method Details
-
getDocumentName
-
processTemplate
public TemplateProcessingResult processTemplate(TemplateHolder templateHolder, Map<String, Object> payload, Map<String, Object> templateProcessingSettings) Description copied from interface:TemplateProcessor
Processes a template given by its definition which might have been loaded through theTemplateRepositoryService
. The payload is used for the placeholders within the template content and must be valid according theTemplateVariationModel.getParameters()
definition.- Parameters:
templateHolder
- the template holder with template and template variation informationpayload
- the optional payload, if the template is using placeholders to render properly (must be valid according the parameter definition)- Returns:
- the template processing results
-
processDocument
protected byte[] processDocument(TemplateHolder templateHolder, ExpressionManager expressionManager, VariableContainer variableContainer) throws Exception - Throws:
Exception
-
getChoiceIndex
-
isExpression
-
getFieldExpression
-
getSupportedFields
-
isOptionField
protected boolean isOptionField(com.aspose.pdf.Field field) -
createProcessorContentItem
protected ContentItem createProcessorContentItem(ContentService contentService, String outputDocumentName, String outputDocumentType) - Specified by:
createProcessorContentItem
in classDocumentTemplateProcessor
-
getAsByteArray
- Throws:
Exception
-
getTemplateDocument
-