Hi,

Is setting an output intent with a destOutputProfile supported in the
current itext version?

Just found this comment on the itext-sharp mailinglist that says it's
not yet supported there.
http://www.nabble.com/Output-Intent-for-PDF-A-tf3808810.html#a10798493

Thanks in advance
Armin



Armin Häberling wrote:
> Hi,
> 
> I'm trying to add a custom Output Intent with an sRGB color profile to a
> PDF. I started with the Hello world example and tried to set the
> OutputIntent before opening the document:
> 
> byte[] colorProfileData = getColorProfile();
> Document document = new Document();
> try {
>     PdfWriter writer = PdfWriter.getInstance(document,
>         new FileOutputStream("HelloWorld.pdf"));
> 
>     writer.setOutputIntents("Custom", "PDF/A sRGB", null, "PDF/A sRGB
> ICC Profile, sRGB_IEC61966-2-1_withBPC.icc", colorProfileData);
> 
>     document.open();
>     document.add(new Paragraph("Hello World"));
> } catch (DocumentException de) {
>    System.err.println(de.getMessage());
> } catch (IOException ioe) {
>    System.err.println(ioe.getMessage());
> }
> document.close();
> 
> But this resulted in a NullPointerException in the method
> PdfWriter.setOutputIntents().
> 
> 
> Then I tried setting the OutputIntent after the document.open() call:
> 
> byte[] colorProfileData = getColorProfile();
> Document document = new Document();
> try {
>     PdfWriter writer = PdfWriter.getInstance(document,
>         new FileOutputStream("HelloWorld.pdf"));
>     document.open();
> 
>     writer.setOutputIntents("Custom", "PDF/A sRGB", null, "PDF/A sRGB
> ICC Profile, sRGB_IEC61966-2-1_withBPC.icc", colorProfileData);
> 
>     document.add(new Paragraph("Hello World"));
> } catch (DocumentException de) {
>    System.err.println(de.getMessage());
> } catch (IOException ioe) {
>    System.err.println(ioe.getMessage());
> }
> document.close();
> 
> But this way I cannot open the resulting Pdf in the Adobe Reader.
> The error message says "There was an error processing a page. There was
> a problem reading this document (16)".
> I attached the resulting Pdf.
> 
> So How can I add such a OutputIntent?
> 
> Thanks in advance,
> Armin
> 
> PS: The color profile that I used is from
> http://www.color.org/srgbprofiles.html
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to