[Poppler-bugs] [Bug 79936] Add support for printing to a Windows printer from pdftocairo
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Sep 27 02:16:55 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=79936
--- Comment #39 from Adrian Johnson <ajohnson at redneon.com> ---
(In reply to comment #36)
> Comment on attachment 106269 [details] [review]
> fix page size selection
>
> Review of attachment 106269 [details] [review]:
> -----------------------------------------------------------------
>
> ::: utils/pdftocairo-win32.cc
> @@ +227,5 @@
> > + *h = GetDeviceCaps (hdc, PHYSICALHEIGHT)*72.0/y_dpi;
> > + } else {
> > + *w = GetDeviceCaps (hdc, HORZRES)*72.0/x_dpi;
> > + *h = GetDeviceCaps (hdc, VERTRES)*72.0/y_dpi;
> > + }
>
> Could we move all this to a separate function that returns the width/height
> to be called before beginPage only for win32? That way we don't need to
> change beginPage in pdftocairo.cc
We don't know the actual width/height until the new size is selected.
In win32BeginPage((), fillPagePrinterOptions() sets the requested page size.
Then ResetDCA() resets the device context to the requested size. Then we get
the actual paper size from the device context which may be different to the
requested size. The actual size is returned to pdftocairo.cc to ensure the
transformations in getFitToPageTransform() are correct.
--
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/20140927/3c19024e/attachment.html>
More information about the Poppler-bugs
mailing list