Hi,

we are trying to embed a Color Profile ICC in a PDF using pdf writer by settings the Output intents: When we see the size, the icc profile seems to be embedded (size of pdf, more than 1500kb instead of 15kb without Output intent) but when we opened the file with illustrator, Illustrator show an error as the pdf not have an embedded ICC profile.

How can we embed the icc profile to the pdf?

Here is the code:

public  static  final  String RESULT1 = "c:/test.pdf";
/** A font program that is used. */
    public  static  final  String FONT = "c:/windows/fonts/arial.ttf";
    /** A color profile that is used. */
    public  static  final  String PROFILE = 
"C:/Users/dev/Documents/Compuzz/ColorProfiles/SC_paper_eci.icc";
/**
     *  Creates a PDF document.
     *  @param  filename the path to the new PDF document
     *  @throws  DocumentException
     *  @throws  IOException
     */
    public  void createPdfX(String filename)throws  IOException, 
DocumentException{
        // step 1
        Document document=  new  Document();
        // step 2
        PdfWriter writer=  PdfWriter.getInstance(document,new  
FileOutputStream(filename));
        writer.setPDFXConformance(PdfWriter.PDFX32002);
        writer.setPdfVersion(PdfWriter.PDF_VERSION_1_7);
        // step 3
        document.open();
        // step 4
        Font  font=  FontFactory.getFont(FONT,  BaseFont.CP1252,  
BaseFont.EMBEDDED,  Font.UNDEFINED,Font.UNDEFINED,  new  CMYKColor(255,  255,  
0,  0));
        ICC_Profile icc=  ICC_Profile.getInstance(new  
FileInputStream(PROFILE));
        writer.setOutputIntents("Custom",  "",  "http://www.color.org";,  
"SC_paper_eci.icc",  icc);
        document.add(new  Paragraph("Hello World",  font));
        // step 5
        document.close();
    }


Thank you in advance,

Regards,

Julien Garcia Gonzalez


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
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