I did some debugging. I found out that I also got the "mostly black"
image by doing a renderPageToGraphics() into the graphics context of a
BufferedImage and save that one. This means that it is not a printer
problem.
The solution:
g.setBackground(Color.WHITE);
was missing in PDFPrintable, or in a later method. If I use this, I get
a clean image. And also a clean print.
Joseph, if you're building from source, just add the line
g.setBackground(Color.WHITE);
above
renderer.renderPageToGraphics(pageIndex, graphics2D, (float)scale);
Tilman
Am 09.04.2014 20:04, schrieb Tilman Hausherr:
I was able to reproduce it with the app and using the PDFReader
parameter and then print from the GUI. I get the effect both when
printing to a printer (there goes the toner...) and printing to a PDF
driver.
I mention this so that people can try the same with another OS or
another JDK to see if there's a difference.
I did it with W7, JDK 1.7.0_51 (64bit)
Tilman
Am 09.04.2014 19:39, schrieb John Hewson:
Hi Joseph
This seems to be a Windows-specific JVM issue, I can’t find an
obvious cause.
I thought you were using Mac OS X?
I have to go and catch another plane now.
Cheers
-- John
On 9 Apr 2014, at 16:12, Joseph Siddal <[email protected]> wrote:
Hi,
I'm using pdfbox 2.0.0 to print pdfs of size 4x6" to label printers.
On windows 7 I try to print a 2 page pdf. It prints successfully
however
the second page is completely black when it should be a table with some
text.
The pdf I am printing is available
here<https://www.dropbox.com/sh/bkzf7nbrs04hm4w/YasXlgnftK/job.pdf>
.
What is printed on Windows 7 is available
here<https://www.dropbox.com/s/lxnsgcfsdc0k2rh/printjob_windows.pdf>
If anyone can help me get the pdf printing on Windows 7 I would really
appreciate it.
Thank you.
Regards
Joseph