Package com.logicaldoc.split.automation
Class SplitTool
java.lang.Object
com.logicaldoc.split.automation.SplitTool
Allows the splitting of a PDF in segments using different policies from
inside the Automation
- Since:
- 8.4
- Author:
- Marco Meschieri - LogicalDOC
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionList<com.logicaldoc.core.document.Document>
splitAllPages
(long docId, String user) Splits a PDF, every page in a separated fileList<com.logicaldoc.core.document.Document>
splitSelection
(long docId, String expression, String user) Splits a PDF, into a selection of pagesList<com.logicaldoc.core.document.Document>
splitUsingBarcode
(long docId, String expression, int separator, String user) Splits a PDF using a barcode as separatorList<com.logicaldoc.core.document.Document>
splitUsingBlankPage
(long docId, int separator, String user) Splits a PDF using a blank page as separatorList<com.logicaldoc.core.document.Document>
splitUsingText
(long docId, String expression, int separator, String user) Splits a PDF using a text as separator
-
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 documentuser
- the current user- Returns:
- list of segments
- Throws:
com.logicaldoc.core.PersistenceException
- Error in the data layercom.logicaldoc.core.parser.ParsingException
- Cannot parse the documentFeatureNotEnabledException
- Feature not enabled in the licenseIOException
- I/O errorcom.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 documentexpression
- 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 layercom.logicaldoc.core.parser.ParsingException
- Cannot parse the documentFeatureNotEnabledException
- Feature not enabled in the licenseIOException
- I/O errorcom.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 documentexpression
- regular expression that must be matched by the barcode's value, seePattern
separator
- how to handle the separator: 0 = skip, 1 = append to current segment, 2 = prepend to next segmentuser
- the current user- Returns:
- list of segments
- Throws:
com.logicaldoc.core.PersistenceException
- Error in the data layercom.logicaldoc.core.parser.ParsingException
- Cannot parse the documentFeatureNotEnabledException
- Feature not enabled in the licenseIOException
- I/O errorcom.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 documentexpression
- regular expression that must be matched by the text, seePattern
separator
- how to handle the separator: 0 = skip, 1 = append to current segment, 2 = prepend to next segmentuser
- the current user- Returns:
- list of segments
- Throws:
com.logicaldoc.core.PersistenceException
- Error in the data layercom.logicaldoc.core.parser.ParsingException
- Cannot parse the documentFeatureNotEnabledException
- Feature not enabled in the licenseIOException
- I/O errorcom.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 documentseparator
- how to handle the separator: 0 = skip, 1 = append to current segment, 2 = prepend to next segmentuser
- the current user- Returns:
- list of segments
- Throws:
com.logicaldoc.core.PersistenceException
- Error in the data layercom.logicaldoc.core.parser.ParsingException
- Cannot parse the documentFeatureNotEnabledException
- Feature not enabled in the licenseIOException
- I/O errorcom.logicaldoc.core.security.authorization.PermissionException
- The user does not have enough permissions
-