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 SummaryConstructors
- 
Method SummaryModifier 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- 
SplitToolpublic SplitTool()
 
- 
- 
Method Details- 
splitAllPagespublic 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
 
- 
splitSelectionpublic 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
 
- 
splitUsingBarcodepublic 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
 
- 
splitUsingTextpublic 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
 
- 
splitUsingBlankPagepublic 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
 
 
-