Problem with setting default color space.

View: New views
3 Messages — Rating Filter:   Alert me  

Problem with setting default color space.

by GaneshPrakhya :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Bruno,

I am setting the default color space in the following...


BatchFillPDFX batch = new BatchFillPDFX();
                        Document document = new Document();
                        PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(targetFile));

writer.setDefaultColorspace(PdfName.DEFAULTCMYK, null);
PdfDictionary dic = writer.getDefaultColorspace();
System.out.println(dic + "----" + dic.size());

                        writer.setPDFXConformance(PdfWriter.PDFX32002);
                        FontFactory.registerDirectories();
                        writer.setPageEvent(batch);
                        document.open();
//some code.
document.newPage();
//at the end
document.close();

This throwing an exception at document.newPage(), it is NullPointerException. Is there anything wrong in this code.

-- ganesh.

Re: Problem with setting default color space.

by Paulo Soares :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


----- Original Message -----
From: "GaneshPrakhya" <ganesh.prakhya@...>
To: <itext-questions@...>
Sent: Thursday, August 31, 2006 8:40 AM
Subject: [iText-questions] Problem with setting default color space.


>
> writer.setDefaultColorspace(PdfName.DEFAULTCMYK, null);

Where's the calorimetric colorspace?

Paulo

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions@...
https://lists.sourceforge.net/lists/listinfo/itext-questions

Re: Problem with setting default color space.

by GaneshPrakhya :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


 writer.setDefaultColorspace(PdfName.DEFAULTCMYK, null);

In the above the second argument is PdfObject, how can I create the PdfObject, or what value I need to use here since PdfObject is abstract class? I am confused about this second argument.

-Ganesh.

Paulo Soares wrote:
----- Original Message -----
From: "GaneshPrakhya" <ganesh.prakhya@hp.com>
To: <itext-questions@lists.sourceforge.net>
Sent: Thursday, August 31, 2006 8:40 AM
Subject: [iText-questions] Problem with setting default color space.


>
> writer.setDefaultColorspace(PdfName.DEFAULTCMYK, null);

Where's the calorimetric colorspace?

Paulo

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions