This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 142162 - Too many extra pages printed for XML design view
Summary: Too many extra pages printed for XML design view
Status: RESOLVED DUPLICATE of bug 120527
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@xml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-29 23:08 UTC by tonybeckham
Modified: 2008-08-05 18:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screen shot of extra pages. (87.06 KB, text/plain)
2008-07-29 23:09 UTC, tonybeckham
Details
screen shot of extra pages. PNG (87.06 KB, image/png)
2008-07-29 23:09 UTC, tonybeckham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tonybeckham 2008-07-29 23:08:30 UTC
Printing the XML design view for an XML schema will print may unnecessary pages.  For instance, the purchase order
schema will print 8 pages when only 3 are needed (see screen shot).

system:
Product Version: NetBeans IDE Dev (Build 200807291401)
Java: 1.6.0_05; Java HotSpot(TM) 64-Bit Server VM 1.6.0_05-b13-52
System: Mac OS X version 10.5.4 running on x86_64; MacRoman; en_US (nb)

Steps:
1. Create New FIle->XML->Purchase Order
2. Change view to design view
3. Expand all nodes
4. Select print from the file menu, you will see the waste.
Comment 1 tonybeckham 2008-07-29 23:09:11 UTC
Created attachment 66000 [details]
screen shot of extra pages.
Comment 2 tonybeckham 2008-07-29 23:09:36 UTC
Created attachment 66001 [details]
screen shot of extra pages. PNG
Comment 3 Vladimir Yaroslavskiy 2008-07-30 11:44:29 UTC
The problem is not in print/preview. The printable component is wrapperPanel from the class
org.netbeans.modules.xml.schema.abe.InstanceDesignerPanel of the xml.schema.abe module.
This component has too big dimension while real image is less. It leads to the extra pages.

To fix this issue, the component should indicates real size via "print.size" property.
See example:

        wrapperPanel.putClientProperty("print.printable", Boolean.TRUE); // NOI18N
        wrapperPanel.putClientProperty("print.size", new java.awt.Dimension(width, height)); // NOI18N

where width x height is real size.

Reassign to the xml team...
Comment 4 Samaresh Panda 2008-08-05 18:54:04 UTC

*** This issue has been marked as a duplicate of 120527 ***