Package org.verapdf.pd
Class PDDocument
- java.lang.Object
-
- org.verapdf.pd.PDDocument
-
public class PDDocument extends Object
- Author:
- Timur Kamalov
-
-
Field Summary
Fields Modifier and Type Field Description static StringPDF_HEADER_DEFAULT
-
Constructor Summary
Constructors Constructor Description PDDocument()PDDocument(InputStream fileStream)PDDocument(String filename)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPage(PDPage page, int number)voidclose()PDAcroFormgetAcroForm()PDCataloggetCatalog()COSDocumentgetDocument()PDMetadatagetMetadata()intgetNumberOfPages()PDOutlineDictionarygetOutlines()List<PDOutputIntent>getOutputIntents()PDPagegetPage(int number)List<PDPage>getPages()SeekableInputStreamgetPDFSource()PDStructTreeRootgetStructTreeRoot()PDPagenewPage(double[] bbox, int insertAt)voidopen(InputStream inputStream)voidopen(String filename)voidsave()voidsaveAs(String fileName)voidsaveAs(Writer out, String filename)voidsaveTo(OutputStream stream)
-
-
-
Field Detail
-
PDF_HEADER_DEFAULT
public static final String PDF_HEADER_DEFAULT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PDDocument
public PDDocument() throws IOException- Throws:
IOException
-
PDDocument
public PDDocument(String filename) throws IOException
- Throws:
IOException
-
PDDocument
public PDDocument(InputStream fileStream) throws IOException
- Throws:
IOException
-
-
Method Detail
-
open
public void open(String filename) throws IOException
- Throws:
IOException
-
open
public void open(InputStream inputStream) throws IOException
- Throws:
IOException
-
close
public void close()
-
getCatalog
public PDCatalog getCatalog()
-
getDocument
public COSDocument getDocument()
-
getNumberOfPages
public int getNumberOfPages()
-
getPage
public PDPage getPage(int number)
-
addPage
public void addPage(PDPage page, int number)
-
newPage
public PDPage newPage(double[] bbox, int insertAt)
-
save
public void save()
-
saveAs
public void saveAs(String fileName) throws IOException
- Throws:
IOException
-
saveTo
public void saveTo(OutputStream stream)
-
getStructTreeRoot
public PDStructTreeRoot getStructTreeRoot()
-
getMetadata
public PDMetadata getMetadata()
-
getOutputIntents
public List<PDOutputIntent> getOutputIntents()
-
getOutlines
public PDOutlineDictionary getOutlines()
-
getAcroForm
public PDAcroForm getAcroForm()
-
getPDFSource
public SeekableInputStream getPDFSource()
-
-