public class PDFDocumentImpl extends Object implements PDFDocument
| Constructor and Description |
|---|
PDFDocumentImpl(InputStream pdfStream)
Create a new PDFDocumentImpl from the passed InputStream
|
PDFDocumentImpl(PDDocument document) |
| Modifier and Type | Method and Description |
|---|---|
InfoDictionary |
getInfoDictionary()
Return pdf document information dictionary representation.
|
Metadata |
getMetadata()
Return pdf document metadata representation.
|
boolean |
isNeedToBeUpdated()
Implemented by Apache PDFBox library.
|
int |
removeFiltersForAllMetadataObjects()
Removes filters for all metadata streams in document
|
MetadataFixerResult |
saveDocumentIncremental(MetadataFixerResult.RepairStatus status,
OutputStream output)
Incremental save of pdf document.
|
public PDFDocumentImpl(InputStream pdfStream) throws IOException
pdfStream - an InputStream to be parsed as a PDF Document.IOException - when there's a problem reading or parsing the file.public PDFDocumentImpl(PDDocument document)
document - public Metadata getMetadata()
getMetadata in interface PDFDocumentMetadatapublic InfoDictionary getInfoDictionary()
getInfoDictionary in interface PDFDocumentInfoDictionarypublic boolean isNeedToBeUpdated()
isNeedToBeUpdated in interface PDFDocumentpublic MetadataFixerResult saveDocumentIncremental(MetadataFixerResult.RepairStatus status, OutputStream output)
MetadataFixerResultImpl must set 1 of 3 states:
MetadataFixerResult.RepairStatus.FIX_ERROR
if got problems with document save
MetadataFixerResult.RepairStatus.NO_ACTION
if metadata and information dictionary was not changed
MetadataFixerResult.RepairStatus.SUCCESS
if document save successful
saveDocumentIncremental in interface PDFDocumentoutput - output stream for document savepublic int removeFiltersForAllMetadataObjects()
PDFDocumentremoveFiltersForAllMetadataObjects in interface PDFDocumentCopyright © 2015–2019 The veraPDF Consortium. All rights reserved.