[ 
https://issues.apache.org/jira/browse/PIVOT-511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13113477#comment-13113477
 ] 

Drazen Dotlic commented on PIVOT-511:
-------------------------------------

Sandro,

I can provide more info on this issue (Andrei is my colleague, so I'm talking 
about the same issue).

We have an applet using Pivot 2.0, we'd like to enable printing of its content. 
Originally, we wanted to print using browser's print functionality. This does 
not work at all except in IE, so we print from Java. The printing code is very 
simple and boils down to implementing Printable (we basically draw directly 
into a PrintContext).

I noticed a strange discrepancy - the code I wrote that draws text prints fine, 
but none of the Pivot Labels do.

Now, the only difference between my code and Pivot's appears to be the exact 
text API used. Looking into your trunk 
(http://svn.apache.org/repos/asf/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/LabelSkin.java),
 I can see that you are using drawGlyphVector, while I am simply calling 
drawString.

Cursory search on the Internet yields several mentions of buggy Java 
implementations on Mac and maybe Windows, especially with ClearType enabled, 
but these should have been fixed by now.

Now, I've tried this on Windows 7 and latest Java 1.6 with and without 
ClearType enabled and nothing changes. Andrei also tried the same on Linux and 
Mac (I tried before on a Mac Snow Leopard and got the same result but will 
re-test again today). I've also tried with Java 1.7 on a Windows XP VM and it 
still doesn't work.

Fortunately, the test case is very simple - a single Pivot Window with a Label 
with a bit of text, run inside an applet viewer debugging session in Eclipse 
(assuming that's the IDE you're using) and printing directly from the applet 
viewer to a PDF 'printer' like CutePDF will immediately show the problem (and 
not waste any paper, go green!).

Please note that the only thing that doesn't print is text, Label's background 
color for example prints just fine.


If you need more information, do let me know.

> Labels doesn't appear in Print from Browser
> -------------------------------------------
>
>                 Key: PIVOT-511
>                 URL: https://issues.apache.org/jira/browse/PIVOT-511
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk, wtk-terra
>    Affects Versions: 1.5, 1.5.1, 2.0
>            Reporter: Sandro Martini
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0, 2.1
>
>         Attachments: Kitchen Sink _ Apache Pivot 1.4.pdf, Kitchen Sink _ 
> Apache Pivot 1.5.pdf, Kitchen Sink _ Apache Pivot 2.0.pdf, Stock Tracker _ 
> Apache Pivot 1.4.pdf, Stock Tracker _ Apache Pivot 1.5.pdf, Swing_Pivot 
> Demo.pdf, Swing_Pivot Demo.png
>
>
> From a Browser, Printing a page, for some reason I have all Labels not in 
> output (see attached pdf, but the same happens with a print to paper).
> With 1.4 it was not so good but labels were present, while in current 1.5 
> pre-release it seems that all is present but not labels.
> This should be a great fix to have in the final 1.5
> This happens on Win XP and Windows 7, both from latest Firefox and IE 8, and 
> on all Pivot Applets.
> Sandro

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to