Class AsposeWordConnector

java.lang.Object
de.xima.aspose.processor.core.AsposeWordConnector
All Implemented Interfaces:
IAsposeConnector

public class AsposeWordConnector extends Object implements 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 Details

    • LOG

      protected static final org.slf4j.Logger LOG
  • Constructor Details

    • AsposeWordConnector

      public AsposeWordConnector()
  • Method Details

    • getDataAdapter

      public IDataAdapter 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

      public List<com.aspose.words.Node> getElementsToDelete()
    • getEvaluationMode

      public EvaluationMode getEvaluationMode()
      Specified by:
      getEvaluationMode in interface IAsposeConnector
    • getReplacer

      public IReplacer getReplacer()
      Returns:
      The current replacer used for the document.
    • getTablesToDelete

      public Map<com.aspose.words.Row,Boolean> getTablesToDelete()
    • initAspose

      public void initAspose(boolean useBackendParameter) throws Exception
      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 interface IAsposeConnector
      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

      public void initAspose(boolean useBackendParameter, boolean useFullFieldName) throws Exception
      Specified by:
      initAspose in interface IAsposeConnector
      Parameters:
      useBackendParameter - - Bool'scher Wert, der angibt ob Backendparameter verwendet werden
      useFullFieldName - - 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

      public void loadDocument(InputStream srcStream) throws Exception
      Description copied from interface: IAsposeConnector
      Loads a Word document from the given stream .
      Specified by:
      loadDocument in interface IAsposeConnector
      Parameters:
      srcStream - Stream with the Word document.
      Throws:
      Exception - When the stream could not be read.
    • loadDocument

      public void loadDocument(String path) throws Exception
      Description copied from interface: IAsposeConnector
      Loads a Word document from the file system.
      Specified by:
      loadDocument in interface IAsposeConnector
      Parameters:
      path - Path to the Word file.
      Throws:
      Exception - When the file could not be read.
    • processDocument

      public void processDocument(IDataAdapter fda, IReplacer replacer) throws Exception
      Description copied from interface: IAsposeConnector
      Processes the Word document, replacing all fields and functions.
      Specified by:
      processDocument in interface IAsposeConnector
      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

      public void saveDocument(OutputStream output, int saveFormat) throws Exception
      Description copied from interface: IAsposeConnector
      Saves the current document to the given stream.
      Specified by:
      saveDocument in interface IAsposeConnector
      Parameters:
      output - Output stream to which to write the document.
      saveFormat - Format of the document, see SaveFormat.
      Throws:
      Exception - When the file could not be written.
    • saveDocument

      public void saveDocument(String outputFile) throws Exception
      Description copied from interface: IAsposeConnector
      Saves the current document to the file system.
      Specified by:
      saveDocument in interface IAsposeConnector
      Parameters:
      outputFile - Path to the file to which to write the document.
      Throws:
      Exception - When the file could not be written.
    • setEvaluationMode

      public void setEvaluationMode(EvaluationMode evaluationMode)
      Setzte den Modus unter dem Aspose laufen soll
      Specified by:
      setEvaluationMode in interface IAsposeConnector