Package org.verapdf.metadata.fixer.gf
Class GFMetadataFixerImpl
java.lang.Object
org.verapdf.metadata.fixer.gf.GFMetadataFixerImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,Component,MetadataFixer
- Author:
- Maksim Bezrukov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()fixMetadata(InputStream toFix, OutputStream outputRepaired, ValidationResult result) static MetadataFixerResultfixMetadata(OutputStream output, PDFDocument document, ValidationResult result, boolean fixIdentification, ProcessedObjectsParser parser) Fix metadata and info dictionary forPDFDocumentand save fixed file a certain path.fixMetadata(PDFAParser parser, OutputStream outputRepaired, ValidationResult result)
-
Constructor Details
-
GFMetadataFixerImpl
public GFMetadataFixerImpl()
-
-
Method Details
-
fixMetadata
public MetadataFixerResult fixMetadata(InputStream toFix, OutputStream outputRepaired, ValidationResult result) throws IOException - Parameters:
toFix- anInputStreamfrom which the PDF/A data to repair can be read.outputRepaired- anOutputStreamto which the Fixer instance should write the repaired PDF/A data.result- aValidationResultinstance for the PDF/A to be repaired, the toFix InputStream.- Returns:
- a
MetadataFixerResultthat holds the repair status and records any fixes applied. - Throws:
IOException
-
fixMetadata
public MetadataFixerResult fixMetadata(PDFAParser parser, OutputStream outputRepaired, ValidationResult result) - Parameters:
parser- a veraPDFPDFAParserinstance that has parsed the PDF/A to repair.outputRepaired- anOutputStreamto which the Fixer instance should write the repaired PDF/A data.result- aValidationResultinstance for the PDF/A to be repaired, the toFix InputStream.- Returns:
- a
MetadataFixerResultthat holds the repair status and records any fixes applied.
-
close
public void close() -
fixMetadata
public static MetadataFixerResult fixMetadata(OutputStream output, PDFDocument document, ValidationResult result, boolean fixIdentification, ProcessedObjectsParser parser) Fix metadata and info dictionary forPDFDocumentand save fixed file a certain path. If fixer no changes apply then no save will be produced.- Parameters:
output- stream to result file- Returns:
- report of made corrections
-
getDetails
- Specified by:
getDetailsin interfaceComponent
-