Package de.xima.aspose.processor.core
Class AsposeWordConnector
java.lang.Object
de.xima.aspose.processor.core.AsposeWordConnector
- All Implemented Interfaces:
IAsposeConnector
Diese Klasse dient dazu ein Word-Dokument mit Formularinhalten zu befüllen und als PDF (andere, von Aspose
unterstützte Ausgabetypen möglich) anzulegen.
- Author:
- XIMA MEDIA GmbH
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.aspose.words.DocumentList<com.aspose.words.Node>voidinitAspose(boolean useBackendParameter) Diese Methode dient dazu, das Aspose-Framework zu konfigurieren.voidinitAspose(boolean useBackendParameter, boolean useFullFieldName) voidloadDocument(InputStream srcStream) Loads a Word document from the given stream .voidloadDocument(String path) Loads a Word document from the file system.voidprocessDocument(IDataAdapter fda, IReplacer replacer) Processes the Word document, replacing all fields and functions.voidsaveDocument(OutputStream output, int saveFormat) Saves the current document to the given stream.voidsaveDocument(String outputFile) Saves the current document to the file system.voidsetEvaluationMode(EvaluationMode evaluationMode) Setzte den Modus unter dem Aspose laufen sollMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.xima.aspose.processor.interfaces.IAsposeConnector
processDocument, processDocument, processDocument
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG
-
-
Constructor Details
-
AsposeWordConnector
public AsposeWordConnector()
-
-
Method Details
-
getDataAdapter
- Returns:
- The current data adapter being used to process the document.
-
getDocument
public com.aspose.words.Document getDocument()- Returns:
- The current document being processed.
-
getElementsToDelete
-
getEvaluationMode
- Specified by:
getEvaluationModein interfaceIAsposeConnector
-
getReplacer
- Returns:
- The current replacer used for the document.
-
getTablesToDelete
-
initAspose
Description copied from interface:IAsposeConnectorDiese Methode dient dazu, das Aspose-Framework zu konfigurieren. Hierbei wird die Aspose-Lizenz gesetzt sowie die Verwendung von Backendparametern, anstelle von Elementnamen- Specified by:
initAsposein interfaceIAsposeConnector- Parameters:
useBackendParameter- - Bool'scher Wert, der angibt ob Backendparameter verwendet werden- Throws:
Exception- - Wenn die Lizenz ungültig ist oder nicht gefunden werden kann
-
initAspose
- Specified by:
initAsposein interfaceIAsposeConnector- Parameters:
useBackendParameter- - Bool'scher Wert, der angibt ob Backendparameter verwendet werdenuseFullFieldName- - Bool'scher Wert, der angibt ob voll qualifizierte Name(z.B. elternelement.feld) als Original-Name verwendet werden soll oder nur der Feldname. Standardmäßig auf false gestellt.- Throws:
Exception- - Wenn die Lizenz ungültig ist oder nicht gefunden werden kann- See Also:
-
loadDocument
Description copied from interface:IAsposeConnectorLoads a Word document from the given stream .- Specified by:
loadDocumentin interfaceIAsposeConnector- Parameters:
srcStream- Stream with the Word document.- Throws:
Exception- When the stream could not be read.
-
loadDocument
Description copied from interface:IAsposeConnectorLoads a Word document from the file system.- Specified by:
loadDocumentin interfaceIAsposeConnector- Parameters:
path- Path to the Word file.- Throws:
Exception- When the file could not be read.
-
processDocument
Description copied from interface:IAsposeConnectorProcesses the Word document, replacing all fields and functions.- Specified by:
processDocumentin interfaceIAsposeConnector- Parameters:
fda- Form data adapter with the data to use.replacer- Optional replacer for replacing placeholders.- Throws:
Exception- When the document could not be processed.
-
saveDocument
Description copied from interface:IAsposeConnectorSaves the current document to the given stream.- Specified by:
saveDocumentin interfaceIAsposeConnector- Parameters:
output- Output stream to which to write the document.saveFormat- Format of the document, seeSaveFormat.- Throws:
Exception- When the file could not be written.
-
saveDocument
Description copied from interface:IAsposeConnectorSaves the current document to the file system.- Specified by:
saveDocumentin interfaceIAsposeConnector- Parameters:
outputFile- Path to the file to which to write the document.- Throws:
Exception- When the file could not be written.
-
setEvaluationMode
Setzte den Modus unter dem Aspose laufen soll- Specified by:
setEvaluationModein interfaceIAsposeConnector
-