List of usage examples for com.itextpdf.text.pdf PdfAStamper PdfAStamper
public PdfAStamper(final PdfReader reader, final OutputStream os, final PdfAConformanceLevel conformanceLevel) throws DocumentException, IOException
From source file:io.konik.carriage.itext.ITextInvoiceAppender.java
License:Open Source License
/** * Append invoice intern.// w ww .j a v a 2 s . c o m * * @param appendable the appendable * @throws IOException Signals that an I/O exception has occurred. * @throws DocumentException the document exception * @throws XMPException the XMP exception */ private void appendInvoiceIntern(AppendParameter appendable) throws IOException, DocumentException, XMPException { byte[] attachmentFile = convertToByteArray(appendable.attachmentFile()); PdfReader reader = new PdfReader(appendable.inputPdf()); PdfAStamper stamper = new PdfAStamper(reader, appendable.resultingPdf(), PdfAConformanceLevel.PDF_A_3B); appendZfMetadata(stamper, appendable.zugferdConformanceLevel(), appendable.zugferdVersion()); attachFile(attachmentFile, stamper); stamper.close(); reader.close(); }