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
FieldsFields inherited from class com.flowable.template.engine.impl.processor.DocumentTemplateProcessor
OUTPUT_TYPE_PDF, OUTPUT_TYPE_WORD, supportedContentType, templateResourceResolver -
Constructor Summary
ConstructorsConstructorDescriptionAsposePdfTemplateProcessor(TemplateResourceResolver templateResourceResolver, AsposeTemplateProcessorSettings asposeTemplateProcessorSettings) -
Method Summary
Modifier and TypeMethodDescriptionprotected ContentItemcreateProcessorContentItem(ContentService contentService, String outputDocumentName, String outputDocumentType) protected byte[]getAsByteArray(com.aspose.pdf.Document doc, String pdfComplianceLevel) protected intgetChoiceIndex(Object varValue, com.aspose.pdf.ChoiceField choiceField) protected StringgetDocumentName(Map<String, Object> payload) protected StringgetFieldExpression(com.aspose.pdf.Field field) protected Iterable<com.aspose.pdf.Field>getSupportedFields(com.aspose.pdf.Form pdfForm) protected com.aspose.pdf.DocumentgetTemplateDocument(TemplateHolder templateHolder) protected booleanisExpression(String fieldExpression) protected booleanisOptionField(com.aspose.pdf.Field field) protected byte[]processDocument(TemplateHolder templateHolder, ExpressionManager expressionManager, VariableContainer variableContainer, String pdfComplianceLevel) 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, isContentItemGenerationEnabledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.flowable.template.api.processor.TemplateProcessor
processTemplate
-
Field Details
-
asposeTemplateProcessorSettings
-
-
Constructor Details
-
AsposePdfTemplateProcessor
public AsposePdfTemplateProcessor(TemplateResourceResolver templateResourceResolver, AsposeTemplateProcessorSettings asposeTemplateProcessorSettings)
-
-
Method Details
-
getDocumentName
-
processTemplate
public TemplateProcessingResult processTemplate(TemplateHolder templateHolder, Map<String, Object> payload, Map<String, Object> templateProcessingSettings) Description copied from interface:TemplateProcessorProcesses 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, String pdfComplianceLevel) 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:
createProcessorContentItemin classDocumentTemplateProcessor
-
getAsByteArray
protected byte[] getAsByteArray(com.aspose.pdf.Document doc, String pdfComplianceLevel) throws Exception - Throws:
Exception
-
getTemplateDocument
-