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.Document
List<com.aspose.words.Node>
void
initAspose
(boolean useBackendParameter) Diese Methode dient dazu, das Aspose-Framework zu konfigurieren.void
initAspose
(boolean useBackendParameter, boolean useFullFieldName) void
loadDocument
(InputStream srcStream) Loads a Word document from the given stream .void
loadDocument
(String path) Loads a Word document from the file system.void
processDocument
(IDataAdapter fda, IReplacer replacer) Processes the Word document, replacing all fields and functions.void
saveDocument
(OutputStream output, int saveFormat) Saves the current document to the given stream.void
saveDocument
(String outputFile) Saves the current document to the file system.void
setEvaluationMode
(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, wait
Methods 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:
getEvaluationMode
in interfaceIAsposeConnector
-
getReplacer
- Returns:
- The current replacer used for the document.
-
getTablesToDelete
-
initAspose
Description copied from interface:IAsposeConnector
Diese Methode dient dazu, das Aspose-Framework zu konfigurieren. Hierbei wird die Aspose-Lizenz gesetzt sowie die Verwendung von Backendparametern, anstelle von Elementnamen- Specified by:
initAspose
in 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:
initAspose
in 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:IAsposeConnector
Loads a Word document from the given stream .- Specified by:
loadDocument
in interfaceIAsposeConnector
- Parameters:
srcStream
- Stream with the Word document.- Throws:
Exception
- When the stream could not be read.
-
loadDocument
Description copied from interface:IAsposeConnector
Loads a Word document from the file system.- Specified by:
loadDocument
in interfaceIAsposeConnector
- Parameters:
path
- Path to the Word file.- Throws:
Exception
- When the file could not be read.
-
processDocument
Description copied from interface:IAsposeConnector
Processes the Word document, replacing all fields and functions.- Specified by:
processDocument
in 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:IAsposeConnector
Saves the current document to the given stream.- Specified by:
saveDocument
in 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:IAsposeConnector
Saves the current document to the file system.- Specified by:
saveDocument
in 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:
setEvaluationMode
in interfaceIAsposeConnector
-