[Poppler-bugs] [Bug 79936] Add support for printing to a Windows printer from pdftocairo

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Sep 16 05:19:33 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=79936

--- Comment #20 from Adrian Johnson <ajohnson at redneon.com> ---
(In reply to comment #18)
> > I also noticed in the documentation for DocumentProperties() at
> > http://msdn.microsoft.com/en-us/library/windows/desktop/dd183576%28v=vs.
> > 85%29.aspx
> > that we are not doing step 5 in the "To make changes to print settings that
> > are local to an application, an application should follow these steps:"
> > section. It seems to work without the extra call to DocumentProperties() but
> > I am wondering if we should do exactly what the documentation says to do to
> > change the print settings.
> 
> Interesting... I really don't what is this last call for. Maybe it is for
> user selection validation, or something like that.  But that could easily
> been done at `CreateDC()`...

I found another interesting example:

http://support.microsoft.com/kb/167345/en-us

I suggest we use this as a template for modifying the print settings.

> But now that we are into it, would it make sense to add a CLI option to show
> the printer property sheet? That is, to call `DocumentProperties()` with the
> `DM_IN_PROMPT` flag. I think that it could be done easily. Add the call from
> step 5 of the reference doc, but just add the `DM_IN_PROMPT` flag iff the
> `-prnproperties` (or whatever) option is used.

Interesting. But I would take it one step further and display the print dialog.
Then the user can select the printer as well as change the print settings. eg
-printdlg opens the print dialog.

One problem would be the page size selection. On the command line not
specifying the paper size means use whatever page size is in the PDF. This also
supports printing PDFs with different page sizes (assuming the printer also has
the different paper sizes available). Using the print dialog would require
adding an extra option to the dialog to specify "select paper size using PDF
page size".

I found another issue with the code. I don't like the names of the duplex
options "simplex", "horizontal", and "vertical". Most print dialogs I've seen
use options like "one sided" or "off", "long edge" and "short edge". I suggest
we use the names "off", "long", and "short".

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20140916/5f28d158/attachment.html>


More information about the Poppler-bugs mailing list