Bug 394601 - Add Print Preview
Summary: Add Print Preview
Status: REPORTED
Alias: None
Product: ksudoku
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Ian Wadham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-23 08:54 UTC by Gregor Mi
Modified: 2018-06-29 21:56 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gregor Mi 2018-05-23 08:54:16 UTC
I am not sure where to report this.

Quite a few applications - e.g. KSudoku - have a Print... action (which opens the default printing dialog) but not a Print Preview action.

As a workaround, one can choose the PDF Printer in the Printing Dialog, choose a filepath, click Print, find the PDF and open it to have a print preview.

Two things would be helpful on the Printing Dialog:

1) Add "Print Preview" support as already noted in https://community.kde.org/Printing/Missing_Features#Print_Preview: "could fake Basic Print Preview by printing to PDF and calling default viewer" 

2) Have a separate button "Export to PDF" which uses the default printer settings for page size etc. and then shows a Save... dialog to selecte the target PDF file (in contrast to the current situation where the PDF Printer must be selected from the Printer combobox and the target file must be chosen with a "..." button)
Comment 1 Kai Uwe Broulik 2018-05-23 09:04:57 UTC
The printing dialog is provided by Qt, so it would have to be changed here. CC'ing Albert as he lately did a lot of work in that area.
Comment 2 Albert Astals Cid 2018-05-24 17:38:24 UTC
The apps that are interested in having a print preview can just use QPrintPreviewDialog, adding that to the print dialog seems a bit weird to me, at least i don't know of any platform/software that offer print preview from the print dialog itself.
Comment 3 Christoph Feck 2018-06-15 21:21:12 UTC
Applications opening the printing dialog (QPrintDialog) do not submit the document there. In fact, applications only create the printed document after the dialog provides the page size and other information needed to create it.

Reassigning to ksudoku developers to check if they can use QPrintPreviewDialog.
Comment 4 Ian Wadham 2018-06-15 23:30:32 UTC
KSudoku is peculiar because it attempts to use the printer in a pseudo-on-line mode, rather than spooled. It only "prints" a puzzle that is on the screen at the moment, rather than everything that has gone before in a KSudoku session. So the "preview" is essentially what you see on the screen already... :-)

That said, the printing has a setting that controls whether it prints one puzzle (screen) per page, which is wasteful of paper for a 9x9 Classic Sudoku, or whether it tries to go "lazy" and fit several puzzles (screens) on a page before sending the page to the printer. A preview might be useful for the user to see how that is progressing and how big the puzzles will appear on the page.

Note also that the print dialog comes up only once, when you first ask to print, rather than every time you ask to print. Maybe this is wrong, but I like it.

Also the printed copy of a puzzle includes solved cells (in grey) but does not include the small "notes" characters.