/** * */ package at.gv.egiz.pdfas.framework.input.correction; import at.gv.egiz.pdfas.exceptions.framework.CorrectorException; import at.gv.egiz.pdfas.framework.input.PdfDataSource; /** * Interface for PDF corretors. * *

* Often PDF documents generated by various document to PDF converters have an * invalid structure that upsets PDF-AS. The correction mechanism allows these * documents to be corrected before being signed. *

*

* A PDF corrector takes an incorrect PDF document and transforms it into a * correct one. *

*

* Note that correcting a document destroys all signatures in that document, so * never correct an already signed document. *

* * @author wprinz */ public interface Corrector { /** * Corrects the given PDF document to a form that PDF-AS can use. * * @param document * The (incorrect) PDF document. * @return Returns the corrected PDF document. * @throws CorrectorException * Exception thrown if the document couldn't be corrected. */ public PdfDataSource correctDocument(PdfDataSource document) throws CorrectorException; }