Class PDFAttachmentHelper

java.lang.Object
br.gov.lexml.pdfa.PDFAttachmentHelper

public class PDFAttachmentHelper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static void
    addAFEntry(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 void
    addAFEntry(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.PdfFileSpecification
    addAttachment(com.itextpdf.text.pdf.PdfWriter writer, PDFAttachmentFile file)
    Fonte: http://support.itextpdf.com/node/130
    static void
    addAttachmentsToPDF(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 PdfWriter
    protected static void
    extractAttachment(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/130
    static void
    Fonte: http://support.itextpdf.com/node/130
    static void
    main(String[] args)
     
    static void
    removeAttachments(com.itextpdf.text.pdf.PdfReader reader)
    Fonte: http://itext-general.2136553.n4.nabble.com/Managing-PDF-attachments -with-iText-td2163977.html

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PDFAttachmentHelper

      public PDFAttachmentHelper()
  • Method Details

    • main

      public static void main(String[] args) throws IOException, com.itextpdf.text.DocumentException
      Throws:
      IOException
      com.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:
      IOException
      com.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:
      IOException
      com.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

      public static void extractAttachments(String src, String dir) throws IOException
      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 -