Class WordHelper


  • public final class WordHelper
    extends Object
    • Method Detail

      • conNoSearchValues

        public static boolean conNoSearchValues​(List<String[]> fdaValue,
                                                List<String> searchValues)
      • findFields

        public static List<? extends com.aspose.words.Field> findFields​(com.aspose.words.Document doc)
      • findFields

        public static List<? extends com.aspose.words.Field> findFields​(com.aspose.words.Document document,
                                                                        int fieldType)
      • findMergeFields

        public static List<com.aspose.words.FieldMergeField> findMergeFields​(com.aspose.words.Document document)
      • formFieldToRun

        public static com.aspose.words.Run formFieldToRun​(com.aspose.words.FormField formField)
        Parameters:
        formField - A form field to convert.
        Returns:
        A new run based on the form field. It is inserted into the document at the position of the original form field.
      • getAncestor

        public static <T extends com.aspose.words.Node> T getAncestor​(com.aspose.words.Node node,
                                                                      Class<T> clazz)
      • getLast

        public static com.aspose.words.Node getLast​(Object item)
      • hasValue

        public static boolean hasValue​(List<String[]> fdaValue,
                                       List<String> searchValues)
      • insertFieldAfter

        public static com.aspose.words.Field insertFieldAfter​(com.aspose.words.Node node,
                                                              String fieldCode)
      • insertHtml

        public static void insertHtml​(com.aspose.words.Document document,
                                      com.aspose.words.Run run,
                                      String html,
                                      boolean useBuilderFormatting,
                                      boolean sanitizeHtml)
                               throws Exception
        Throws:
        Exception
      • insertHtml

        public static void insertHtml​(com.aspose.words.DocumentBuilder docBuilder,
                                      String value,
                                      boolean useBuilderFormatting,
                                      boolean sanitizeHtml)
                               throws Exception
        Throws:
        Exception
      • insertImage

        public static void insertImage​(com.aspose.words.Document document,
                                       com.aspose.words.Run run,
                                       BufferedImage bi,
                                       List<String> multiValueList)
      • insertRunAfter

        public static com.aspose.words.Run insertRunAfter​(com.aspose.words.Node field)
      • isCurrentValueListBlank

        public static boolean isCurrentValueListBlank​(List<String[]> stringArrayList)
      • lst

        public static List<String[]> lst​(AsposeWordConnector conn,
                                         IFunctionWithArguments formField,
                                         List<String[]> fdaValue,
                                         Map<String,​? extends Map<String,​String>> optionsMap,
                                         String optionName)
        Ersätzung aller vorhandenen Werte mit (wenn verfügbar) anderen Werten der Option
        Parameters:
        conn - Current Aspose Word connector.
        fdaValue - Array der Ursprungs-Werte
        formField - Das Feld füe welches die Werte gesetzt werden sollen
        optionsMap - List of form field options.
        optionName - der Name des Option-Attributes für die Ersetzung (zum Beispiel Title oder Text)
        Returns:
        The listed value.
      • remove

        public static void remove​(Object item)
      • unwrapNode

        public static <T extends com.aspose.words.Node> T unwrapNode​(Object item,
                                                                     Class<T> type)
      • val

        public static List<String[]> val​(AsposeWordConnector conn,
                                         IFunctionWithArguments func)
        Method that returns the values of the given arguments, by replacing placeholders, retrieving field values or just using the String if none of the previous where possible.
        Parameters:
        conn - Current Aspose Word Connector
        func - the given function with parameters
        Returns:
        The values