Thanks for your reply:

here is my requirement: 

- Convert PDF Level 1.4 to PDF/A
- all fonts embedded 
- stripping out forms
- able to convert Digital Signature

below is the code snipped which i wrote using jar IText 2.1.3 . This code
convert PDF to PDF/A , but I do not know that, it is covering my above
requirement or not.

private static void convert() throws Exception{

        //Name of the pdf/A converted
        String pdfA = "C:\\ACC\\PDFtoPDFA\\my.pdf";
        //Name of the pdf to convert
        String pdf = "C:\\ACC\\PDFtoPDFA\\DebitCardOverdraft.pdf";

        //Reads a PDF document.
        PdfReader reader = new PdfReader(pdf);
        //PdfStamper: Applies extra content to the pages of a PDF document.
This extra content can be all the objects allowed in
        //PdfContentByte including pages from other Pdfs.
        PdfStamper stamper = new PdfStamper(reader, new
FileOutputStream(pdfA));
        //A generic Document class.
        Document document = new Document();
        // we create a writer that listens to the document
        PdfWriter writer = stamper.getWriter();
        int numberPages = reader.getNumberOfPages();

        writer.setPDFXConformance(PdfWriter.PDFA1A);

        document.open();

        //PdfDictionary:A dictionary is an associative table containing
pairs of objects.
                //The first element of each pair is called the key and the 
second
element is called the value
                //<CODE>PdfName</CODE> is an object that can be used as a name 
in a
PDF-file
        PdfDictionary outi = new PdfDictionary(PdfName.OUTPUTINTENT);
        outi.put(PdfName.OUTPUTCONDITIONIDENTIFIER, new PdfString("sRGB
IEC61966-2.1"));
        outi.put(PdfName.INFO, new PdfString("sRGB IEC61966-2.1"));
        outi.put(PdfName.S, PdfName.GTS_PDFA1);
        writer.getExtraCatalog().put(PdfName.OUTPUTINTENTS, new
PdfArray(outi));

        //Add pages
        PdfImportedPage p = null;
        Image image;
        for(int i=0; i< numberPages; i++){
            p = writer.getImportedPage(reader, i+1);
            image = Image.getInstance(p);
            document.add(image);
        }
        writer.createXmpMetadata();

        document.close();

        //Add Metadata from source pdf
        HashMap info = reader.getInfo();
        stamper.setMoreInfo(info);
        stamper.close();

       // showFileSize(pdfA);

    }
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/PDF-to-PDFA-Conversion-tp3303633p3305038.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to