java.lang.Object
org.sejda.impl.sambox.component.PagesExtractor
- All Implemented Interfaces:
Closeable,AutoCloseable
Component that retains pages from a given existing
PDDocument and saves a new document containing retained pages and an outline that patches the new document.- Author:
- Andrea Vacondio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected PDDocumentHandlervoidoptimize()voidreset()Resets the component making it ready to start a new extractions from the original documentvoidretain(int page, TaskExecutionContext executionContext) voidretain(Set<Integer> pages, TaskExecutionContext executionContext) voidsave(File file, boolean discardOutline, EncryptionAtRestPolicy encryptionAtRestSecurity) voidsetCompress(boolean compress) voidsetVersion(PdfVersion version)
-
Constructor Details
-
PagesExtractor
public PagesExtractor(org.sejda.sambox.pdmodel.PDDocument origin)
-
-
Method Details
-
retain
public void retain(Set<Integer> pages, TaskExecutionContext executionContext) throws TaskExecutionException - Throws:
TaskExecutionException
-
retain
- Throws:
TaskExecutionException
-
setVersion
-
setCompress
public void setCompress(boolean compress) -
optimize
public void optimize() -
save
public void save(File file, boolean discardOutline, EncryptionAtRestPolicy encryptionAtRestSecurity) throws TaskException - Throws:
TaskException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
destinationDocument
-
reset
public void reset()Resets the component making it ready to start a new extractions from the original document
-