Think, I found cause the problem. 
I experimented with simple pdf, and removing 

writer.setDefaultColorspace(PdfName.COLORSPACE, PdfName.DEFAULTCMYK)

helped me generate printable PDF. 
Adding this line will produce unprintable in Mac Reader PDF even in
simplest example:

Document document = new Document(new Rectangle(300, 300));
FileOutputStream outStream = new FileOutputStream("c:/1/test.pdf");
PdfWriter writer = PdfWriter.getInstance(document, outStream);
writer.setDefaultColorspace(PdfName.COLORSPACE, PdfName.DEFAULTCMYK);
document.open();
document.add(new Paragraph("Hello World"));
document.close();

Kind regards,
Alexander Filipchik
 
Lead Developer
AT Software

-----Original Message-----
From: 1T3XT info [mailto:[email protected]] 
Sent: Thursday, May 14, 2009 7:31 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] - Re: Can't print generated PDF in Mac OS
(AdobeReader) - Email found in subject

Alexander Filipchik wrote:
> Yes, I called it.
> My code:

When I test the "printability" of a PDF, I use PdfCreator (on Windows).
When I tried printing your file, I also got the following errors:

First a dialog box: "(i) The document could not be printed"
Followed by: "(i) There were no pages selected to print"

In other words: your problem is genuine.

However, I compared your PDF with the PDFs created with this example:
http://1t3xt.be/?X000156
The resulting PDFs are printed correctly. That means that as far as
we are concerned: it works for us (until the opposite is proven).
If the results generated with http://1t3xt.be/?X000156 are OK,
we have no reason to believe there's a bug in our software.
If there's a bug in your code, we can't afford spending too much time
fixing it for you (we have too much other work). I'm sorry for the
inconvenience that may cause.

I've looked at the PDF using iText RUPS and I saw some strange things;
for instance: in the ViewerPreferences you set /ViewArea to /ArtBox,
but the page only has a /MediaBox and /TrimBox, no /ArtBox.
However I don't think that's the culprit. It must be something else,
but I don't see it. Maybe you should use Occam's razor and remove
all the unnecessary lines of code (like the TrimBox/ArtBox stuff)
until you have a PDF that prints well. That way, you'll know that
the last thing you "shaved" away was causing the problem.

It would be interesting for us to know what that problem was,
so I thank you in advance for your feedback.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------
------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks
to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
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
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list:
http://1t3xt.info/tutorials/keywords/

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
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
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to