The EOL issue is already fixed in the SVN. Get it from there or wait for the 
next release.

Paulo

----- Original Message ----- 
From: "Michael Klink" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, October 27, 2008 8:52 AM
Subject: Re: [iText-questions] Added support for PDF/A-1


Hello!

Is being able to create PDF/A documents still an objective of iText?

I ran the code appended to the PDF/A support announcement from June 2007 
using iText 2.1.3. The resulting PDF file is attached to this mail. I check 
this file using Acrobat 9 Preflight for PDF/A-1b compliance and got a syntax 
problem telling me about a missing EOL after obj in an indirect object.

Indeed, inspecting the document, no 'obj' of an indirect object in the 
document at all is followed by an EOL, and looking at 
PdfIndirectObject.writeTo(OutputStream) it becomes clear that there hardly 
is a chance that any 'obj' ever can be.

The standard, on the other hand, says in section 6.1.8 that the "obj and 
endobj keywords shall each be followed by an EOL marker."

Best regards,   Michael.

-----Original Message-----
From: Paulo Soares <psoares <at> consiste.pt>
Subject: Added support for PDF/A-1
Newsgroups: gmane.comp.java.lib.itext.general, 
gmane.comp.windows.dotnet.itextsharp.general
Date: 2007-06-05 15:06:23 GMT (1 year, 20 weeks, 1 day, 15 hours and 42 
minutes ago)

I've added support for PDF/A-1 and is available in the iText SVN and the 
iTextSharp CVS. An example:

Document doc = new Document(PageSize.A4);
PdfWriter writer = PdfWriter.getInstance(doc, new 
FileOutputStream("C:\\hello_A1-b.pdf"));
writer.setPDFXConformance(PdfWriter.PDFA1B);
doc.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);
doc.add(new Paragraph("hello", f));
writer.createXmpMetadata();
doc.close();


-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to