added failing test for pdf a schema extensions

This commit is contained in:
Jochen Stärk
2017-11-27 19:37:30 +01:00
parent f4beafdfc6
commit c72e843e2e
2 changed files with 10 additions and 2 deletions

View File

@@ -49,10 +49,16 @@ public class ZUGFeRDExporterFromA3Factory implements IExporterFactory {
* filename of an PDF/A1 compliant document
*/
public ZUGFeRDExporter load(String pdfFilename) throws IOException {
ensurePDFIsValidPDFA(new FileDataSource(pdfFilename));
ZUGFeRDExporter zugFeRDExporter;
PDDocument doc = PDDocument.load(new File(pdfFilename));
prepareDocument(doc);
return new ZUGFeRDExporter(doc);
zugFeRDExporter = new ZUGFeRDExporter(doc);
zugFeRDExporter.setZUGFeRDVersion(ZFVersion);
zugFeRDExporter.setZUGFeRDConformanceLevel(zugferdConformanceLevel);
return zugFeRDExporter;
}
@@ -107,6 +113,7 @@ public class ZUGFeRDExporterFromA3Factory implements IExporterFactory {
prepareDocument(doc);
zugFeRDExporter = new ZUGFeRDExporter(doc);
zugFeRDExporter.setZUGFeRDVersion(ZFVersion);
zugFeRDExporter.setZUGFeRDConformanceLevel(zugferdConformanceLevel);
return zugFeRDExporter;
}