Package br.gov.lexml.pdfa
Class PDFAttachmentHelper
java.lang.Object
br.gov.lexml.pdfa.PDFAttachmentHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddAFEntry(com.itextpdf.text.pdf.PdfDictionary catalog, List<com.itextpdf.text.pdf.PdfFileSpecification> pdfFileSpecificationList) PDF/A-3: Put an AF entry field in a PdfDictionary (used with PdfReader).protected static voidaddAFEntry(com.itextpdf.text.pdf.PdfWriter writer, List<com.itextpdf.text.pdf.PdfFileSpecification> pdfFileSpecificationList) PDF/A-3: Put an AF entry field in a PdfWriter.protected static com.itextpdf.text.pdf.PdfFileSpecificationaddAttachment(com.itextpdf.text.pdf.PdfWriter writer, PDFAttachmentFile file) Fonte: http://support.itextpdf.com/node/130static voidaddAttachmentsToPDF(InputStream pdfSource, OutputStream dest, List<PDFAttachmentFile> files, com.itextpdf.text.pdf.PdfAConformanceLevel conformanceLevel) Open a PDF, add attachments files to and close it.static List<com.itextpdf.text.pdf.PdfFileSpecification>addAttachmentsToPdfWriter(com.itextpdf.text.pdf.PdfWriter writer, List<PDFAttachmentFile> files) Add attachments files to a PdfWriterprotected static voidextractAttachment(com.itextpdf.text.pdf.PdfReader reader, File dir, com.itextpdf.text.pdf.PdfString name, com.itextpdf.text.pdf.PdfDictionary filespec) Fonte: http://support.itextpdf.com/node/130static voidextractAttachments(String src, String dir) Fonte: http://support.itextpdf.com/node/130static voidstatic voidremoveAttachments(com.itextpdf.text.pdf.PdfReader reader) Fonte: http://itext-general.2136553.n4.nabble.com/Managing-PDF-attachments -with-iText-td2163977.html
-
Constructor Details
-
PDFAttachmentHelper
public PDFAttachmentHelper()
-
-
Method Details
-
main
- Throws:
IOExceptioncom.itextpdf.text.DocumentException
-
addAttachmentsToPDF
public static void addAttachmentsToPDF(InputStream pdfSource, OutputStream dest, List<PDFAttachmentFile> files, com.itextpdf.text.pdf.PdfAConformanceLevel conformanceLevel) throws IOException, com.itextpdf.text.DocumentException Open a PDF, add attachments files to and close it. Reference: http://support.itextpdf.com/node/130- Parameters:
pdfSource-dest-files-conformanceLevel-- Throws:
IOExceptioncom.itextpdf.text.DocumentException
-
addAttachmentsToPdfWriter
public static List<com.itextpdf.text.pdf.PdfFileSpecification> addAttachmentsToPdfWriter(com.itextpdf.text.pdf.PdfWriter writer, List<PDFAttachmentFile> files) throws IOException, com.itextpdf.text.DocumentException Add attachments files to a PdfWriter- Parameters:
writer-files-- Throws:
IOExceptioncom.itextpdf.text.DocumentException
-
addAFEntry
protected static void addAFEntry(com.itextpdf.text.pdf.PdfWriter writer, List<com.itextpdf.text.pdf.PdfFileSpecification> pdfFileSpecificationList) throws IOException PDF/A-3: Put an AF entry field in a PdfWriter.- Parameters:
writer-pdfFileSpecificationList-- Throws:
IOException
-
addAFEntry
protected static void addAFEntry(com.itextpdf.text.pdf.PdfDictionary catalog, List<com.itextpdf.text.pdf.PdfFileSpecification> pdfFileSpecificationList) throws IOException PDF/A-3: Put an AF entry field in a PdfDictionary (used with PdfReader).- Parameters:
catalog-pdfFileSpecificationList-- Throws:
IOException
-
addAttachment
protected static com.itextpdf.text.pdf.PdfFileSpecification addAttachment(com.itextpdf.text.pdf.PdfWriter writer, PDFAttachmentFile file) throws IOException Fonte: http://support.itextpdf.com/node/130- Parameters:
writer-file-- Throws:
IOException
-
extractAttachments
Fonte: http://support.itextpdf.com/node/130- Parameters:
src-dir-- Throws:
IOException
-
extractAttachment
protected static void extractAttachment(com.itextpdf.text.pdf.PdfReader reader, File dir, com.itextpdf.text.pdf.PdfString name, com.itextpdf.text.pdf.PdfDictionary filespec) throws IOException Fonte: http://support.itextpdf.com/node/130- Parameters:
reader-dir-name-filespec-- Throws:
IOException
-
removeAttachments
public static void removeAttachments(com.itextpdf.text.pdf.PdfReader reader) Fonte: http://itext-general.2136553.n4.nabble.com/Managing-PDF-attachments -with-iText-td2163977.html- Parameters:
reader-
-