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 String
PDF_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 void
addPage(PDPage page, int number)
void
close()
PDAcroForm
getAcroForm()
PDCatalog
getCatalog()
COSDocument
getDocument()
PDMetadata
getMetadata()
int
getNumberOfPages()
PDOutlineDictionary
getOutlines()
List<PDOutputIntent>
getOutputIntents()
PDPage
getPage(int number)
List<PDPage>
getPages()
SeekableInputStream
getPDFSource()
PDStructTreeRoot
getStructTreeRoot()
PDPage
newPage(double[] bbox, int insertAt)
void
open(InputStream inputStream)
void
open(String filename)
void
save()
void
saveAs(String fileName)
void
saveAs(Writer out, String filename)
void
saveTo(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()
-
-