Bug 7722 - [GlobalActions] File menu need Print Preview menu item
Summary: [GlobalActions] File menu need Print Preview menu item
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows 2000
: P5 enhancement with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2002-01-16 10:24 EST by Duong Nguyen CLA
Modified: 2019-09-06 16:05 EDT (History)
7 users (show)

See Also:


Attachments
Screenshot of Simple Print Preview (110.46 KB, image/jpeg)
2004-03-03 16:47 EST, Chris Nagy CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Duong Nguyen CLA 2002-01-16 10:24:53 EST
In order to better support the customer it is desirable that the File menu has 
a Print Preview menu item in addition to the Print menu item.  This would allow 
the users to ensure they are printing what they want.
Comment 1 Kevin Haaland CLA 2002-05-01 13:05:47 EDT
Good idea - anyone in the open source community want to implement this?
We will not have time to consider this for 2.0
Comment 2 Randy Giffen CLA 2002-08-09 10:37:24 EDT
Reopened for investigation
Comment 3 Chris Nagy CLA 2004-03-03 16:47:26 EST
Created attachment 8320 [details]
Screenshot of Simple Print Preview
Comment 4 Chris Nagy CLA 2004-03-03 16:48:21 EST
I put together a simple print preview framework that I'm using in the
application I'm building. Here is a summary of what I did:

New Classes
-----------

- Previewer
This class is the main class, it takes a Printer and Display in the constructor.
It basically creates a temporary image that is the current print preview page
scaled to the display's DPI. It implements all the org.eclipse.swt.Printer
public APIs against the image.

- PrintListener
- PrintEvent
This event listener provides a callback mechanism to notify a ui that state
changed of the print job or current page. The event carries what changed (ie.
start of a new page, end of a new page) and the image representing the current
page before the call completes. It is up to the implementor of the event
listener interface to decided what to do (this usually involves copying the
image and scaling to fit onto a UI control).

Drawbacks
-----------

The font size and spacing could change dramatically when the font is on the
printer device versus the display device. I was hoping to implement a new type
of GC that can take these differences into consideration when writing text
between the printer and device, but GC is tied into everything.

I've submitted a screenshot (the top control is a StyledText and the bottom one
displays the image of the current print preview page).

Hope this helps
Comment 5 Barry Andrews CLA 2004-08-18 14:49:20 EDT
How hard would it be to make this PrintPreview usable in GEF? Basically I would
like to be able to view the drawing that will be printed based on the
PrintFigureOperation flags FIT_HEIGHT, FIT_PAGE, etc. Also be able to see
multiple pages of the drawing if the drawing is split into multiple pages; like
a "Next Page" button. I know this enhancement is for text printing, but will it
be flexible and rich enough to also do the graphics from GEF?

thanks,

Barry
Comment 6 Douglas Pollock CLA 2004-10-22 17:15:51 EDT
Re-assigning to Nick to bring it out of the inbox. 
Comment 7 Nick Edgar CLA 2004-10-25 12:52:53 EDT
We have no plans to address this for 3.1.
Comment 8 Michael Scharf CLA 2005-11-21 20:49:26 EST
will this be considered for 3.2?
Comment 9 Nick Edgar CLA 2005-11-22 08:33:27 EST
There are no plans to address this for 3.2.

Proper support for print preview would require some support from SWT, such as a PrintPreview device (see comments above).  Adding the menu item at Workbench or IDE level is easy.
Comment 10 Steve Northover CLA 2005-12-07 18:24:02 EST
I'm pretty sure this belongs in a layer above SWT, with SWT providing the missing API as appropriate.  Nick?
Comment 11 Steve Northover CLA 2005-12-07 18:25:03 EST
... the PrintPreview device doesn't seem platform specific.
Comment 12 Paul Webster CLA 2007-04-05 19:01:08 EDT
Assigning to component owner
PW
Comment 13 Eclipse Webmaster CLA 2019-09-06 16:05:56 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.