Class PdfScriptMerger

java.lang.Object
com.itextpdf.kernel.utils.PdfScriptMerger

public class PdfScriptMerger extends Object
Utility class which provides functionality to merge ECMA scripts from pdf documents
  • Constructor Details

    • PdfScriptMerger

      public PdfScriptMerger()
  • Method Details

    • mergeScripts

      public static void mergeScripts (PdfDocument source, PdfDocument destination)
      Merges ECMA scripts from source to destinations from all possible places for them, it only copies first action in chain for AA and OpenAction entries
      Parameters:
      source - source document from which script will be copied
      destination - destination document to which script will be copied
    • mergeAdditionalActionsScripts

      public static void mergeAdditionalActionsScripts (PdfDocument source, PdfDocument destination)
      Copies AA catalog entry ECMA scripts, it only copies first action in chain
      Parameters:
      source - source document from which script will be copied
      destination - destination document to which script will be copied
    • mergeOpenActionsScripts

      public static void mergeOpenActionsScripts (PdfDocument source, PdfDocument destination)
      Copies open actions catalog entry ECMA scripts, it only copies first action in chain
      Parameters:
      source - source document from which script will be copied
      destination - destination document to which script will be copied
    • mergeNamesScripts

      public static void mergeNamesScripts (PdfDocument source, PdfDocument destination)
      Copies ECMA scripts from Names catalog entry
      Parameters:
      source - source document from which script will be copied
      destination - destination document to which script will be copied