1T3XT info wrote: > > Sumeet Gupta wrote: >> hi, >> >> I have generated a PDF using iText version 2.0.8. However, i want to know >> as >> to which PDF standard does this PDF conform to. > > Thanks Bruno, I need to adhere to PDF/A. When i did some more search, i > came across > http://article.gmane.org/gmane.comp.java.lib.itext.general/31582/. > However, when i added the mentioned code snippet into my code, I am still > getting the same error :- > > DocumentException: com.lowagie.text.pdf.PdfXConformanceException: All the > fonts must be embedded. > > The following is my code snippet:- > > writer = PdfWriter.getInstance(document, baosPDF); > writer.setPDFXConformance(PdfWriter.PDFA1A); > > document.open(); > > 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); > ICC_Profile icc = ICC_Profile.getInstance(new > FileInputStream("C:\\srgb.profile")); > PdfICCBased ib = new PdfICCBased(icc); > ib.remove(PdfName.ALTERNATE); > outi.put(PdfName.DESTOUTPUTPROFILE, > writer.addToBody(ib).getIndirectReference()); > writer.getExtraCatalog().put(PdfName.OUTPUTINTENTS, new > PdfArray(outi)); > > BaseFont bf = > BaseFont.createFont("c:\\windows\\fonts\\arial.ttf", > BaseFont.WINANSI, true); > Font f = new Font(bf, 12); > ...... > ...... > .....// adding the contents to the pdf > > > document.close(); > > I have ensured that both sgrb.profile and arial.ttf files are present at > the locations mentioned. I am still getting the exception as above. Any > pointers to anything that i may have missed here? > > Does having PDF version 1.4 mean that the PDF is automatically PDF/A > compliant? > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Do you like iText? > Buy the iText book: http://www.1t3xt.com/docs/book.php > Or leave a tip: https://tipit.to/itexttipjar > >
-- View this message in context: http://www.nabble.com/What-is-the-difference-between-PDF-A-and-PDF-X--tp18458617p18607694.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar