use of org.apache.pdfbox.preflight.utils.ByteArrayDataSource in project mustangproject by ZUGFeRD.
the class ZUGFeRDExporterFromA1Factory method loadFromPDFA1.
/**
* Makes A PDF/A3a-compliant document from a PDF-A1 compliant document (on
* the metadata level, this will not e.g. convert graphics to JPG-2000)
*
* @param pdfBinary binary of a PDF/A1 compliant document
*/
public ZUGFeRDExporter loadFromPDFA1(byte[] pdfBinary) throws IOException, TransformerException {
ensurePDFIsValidA1(new ByteArrayDataSource(new ByteArrayInputStream(pdfBinary)));
PDDocument doc = PDDocument.load(pdfBinary);
makePDFA3compliant(doc);
return new ZUGFeRDExporter(doc);
}
use of org.apache.pdfbox.preflight.utils.ByteArrayDataSource in project mustangproject by ZUGFeRD.
the class ZUGFeRDExporterFromA3 method load.
/**
* Makes A PDF/A3a-compliant document from a PDF-A1 compliant document (on the
* metadata level, this will not e.g. convert graphics to JPG-2000)
*
* @param pdfBinary binary of a PDF/A1 compliant document
*/
public ZUGFeRDExporterFromA3 load(byte[] pdfBinary) throws IOException {
ensurePDFIsValid(new ByteArrayDataSource(new ByteArrayInputStream(pdfBinary)));
doc = PDDocument.load(pdfBinary);
return this;
}
use of org.apache.pdfbox.preflight.utils.ByteArrayDataSource in project mustangproject by ZUGFeRD.
the class OXExporterFromA3 method load.
/**
* Makes A PDF/A3a-compliant document from a PDF-A1 compliant document (on the
* metadata level, this will not e.g. convert graphics to JPG-2000)
*
* @param pdfBinary binary of a PDF/A1 compliant document
*/
public OXExporterFromA3 load(byte[] pdfBinary) throws IOException {
ensurePDFIsValid(new ByteArrayDataSource(new ByteArrayInputStream(pdfBinary)));
doc = PDDocument.load(pdfBinary);
return this;
}
Aggregations