Class SplitTool

java.lang.Object
com.logicaldoc.split.automation.SplitTool

public class SplitTool extends Object
Allows the splitting of a PDF in segments using different policies from inside the Automation
Since:
8.4
Author:
Marco Meschieri - LogicalDOC
  • Constructor Details

    • SplitTool

      public SplitTool()
  • Method Details

    • splitAllPages

      public List<com.logicaldoc.core.document.Document> splitAllPages(long docId, String user) throws com.logicaldoc.core.security.authorization.PermissionException, com.logicaldoc.core.PersistenceException, IOException, FeatureNotEnabledException, com.logicaldoc.core.parser.ParsingException
      Splits a PDF, every page in a separated file
      Parameters:
      docId - identifier of the document
      user - the current user
      Returns:
      list of segments
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the data layer
      com.logicaldoc.core.parser.ParsingException - Cannot parse the document
      FeatureNotEnabledException - Feature not enabled in the license
      IOException - I/O error
      com.logicaldoc.core.security.authorization.PermissionException - The user does not have enough permissions
    • splitSelection

      public List<com.logicaldoc.core.document.Document> splitSelection(long docId, String expression, String user) throws com.logicaldoc.core.security.authorization.PermissionException, com.logicaldoc.core.PersistenceException, IOException, FeatureNotEnabledException, com.logicaldoc.core.parser.ParsingException
      Splits a PDF, into a selection of pages
      Parameters:
      docId - identifier of the document
      expression - the selection of pages (e.g.: 1,2,4-6,9)
      user - the current user
      Returns:
      list of segments
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the data layer
      com.logicaldoc.core.parser.ParsingException - Cannot parse the document
      FeatureNotEnabledException - Feature not enabled in the license
      IOException - I/O error
      com.logicaldoc.core.security.authorization.PermissionException - The user does not have enough permissions
    • splitUsingBarcode

      public List<com.logicaldoc.core.document.Document> splitUsingBarcode(long docId, String expression, int separator, String user) throws com.logicaldoc.core.security.authorization.PermissionException, com.logicaldoc.core.PersistenceException, IOException, FeatureNotEnabledException, com.logicaldoc.core.parser.ParsingException
      Splits a PDF using a barcode as separator
      Parameters:
      docId - identifier of the document
      expression - regular expression that must be matched by the barcode's value, see Pattern
      separator - how to handle the separator: 0 = skip, 1 = append to current segment, 2 = prepend to next segment
      user - the current user
      Returns:
      list of segments
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the data layer
      com.logicaldoc.core.parser.ParsingException - Cannot parse the document
      FeatureNotEnabledException - Feature not enabled in the license
      IOException - I/O error
      com.logicaldoc.core.security.authorization.PermissionException - The user does not have enough permissions
    • splitUsingText

      public List<com.logicaldoc.core.document.Document> splitUsingText(long docId, String expression, int separator, String user) throws com.logicaldoc.core.security.authorization.PermissionException, com.logicaldoc.core.PersistenceException, IOException, FeatureNotEnabledException, com.logicaldoc.core.parser.ParsingException
      Splits a PDF using a text as separator
      Parameters:
      docId - identifier of the document
      expression - regular expression that must be matched by the text, see Pattern
      separator - how to handle the separator: 0 = skip, 1 = append to current segment, 2 = prepend to next segment
      user - the current user
      Returns:
      list of segments
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the data layer
      com.logicaldoc.core.parser.ParsingException - Cannot parse the document
      FeatureNotEnabledException - Feature not enabled in the license
      IOException - I/O error
      com.logicaldoc.core.security.authorization.PermissionException - The user does not have enough permissions
    • splitUsingBlankPage

      public List<com.logicaldoc.core.document.Document> splitUsingBlankPage(long docId, int separator, String user) throws com.logicaldoc.core.security.authorization.PermissionException, com.logicaldoc.core.PersistenceException, IOException, FeatureNotEnabledException, com.logicaldoc.core.parser.ParsingException
      Splits a PDF using a blank page as separator
      Parameters:
      docId - identifier of the document
      separator - how to handle the separator: 0 = skip, 1 = append to current segment, 2 = prepend to next segment
      user - the current user
      Returns:
      list of segments
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the data layer
      com.logicaldoc.core.parser.ParsingException - Cannot parse the document
      FeatureNotEnabledException - Feature not enabled in the license
      IOException - I/O error
      com.logicaldoc.core.security.authorization.PermissionException - The user does not have enough permissions