pescuma / swt-paperclips

Automatically exported from code.google.com/p/swt-paperclips
0 stars 0 forks source link

Print preview not working on mac #34

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. open print preview on mac osx 
2.
3.

What is the expected output?
Preview opens(even if I dont have a printer)
What do you see instead?
Preview hangs.. Just white screen where preview should be..

What version of the product are you using? On what operating system?
paperclips 1.0.4.200
Macosx

Please provide any additional information below.

Original issue reported on code.google.com by LarsBi...@gmail.com on 23 Oct 2010 at 10:56

GoogleCodeExporter commented 9 years ago
I am getting the same problem on Mac OSX 10.6.  Calling 
PrintPreview.setPrintJob(PrintJob) just produces a blank screen.  The same test 
case works fine on Windows.  There are no errors in the print preview window.  
Our code seems to be running fine with no errors in the logs.

Original comment by cbeaveri...@gmail.com on 9 Nov 2010 at 10:34

GoogleCodeExporter commented 9 years ago
What happens if you explicitly call setPrinterData on the preview before 
setting the print job?

Original comment by qualidaf...@gmail.com on 9 Nov 2010 at 10:57

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi all,

I think I've found a workaround!
We had the same Problem on Mac OSX 10.5 and 10.6.
We then took the examples and tried them. Same effect. Snippet7 for example 
brought up a white dialog with no content being drawn.

Setting printerdata before preview did not help. It still did not help when a 
new printer was explicitely installed and selected. (Thought it could be caused 
by a missing default printer...).

That's not it!

The Problem is obviously related to the GC (method getGC()) which is created 
from the printer. A played around with different alternatives. I got one 
running!

Patch is attached.

Have fun!
Roland Oldenburg

Original comment by rol.olde...@gmail.com on 16 Jan 2012 at 7:23

Attachments: