[Poppler-bugs] [Bug 87161] Printing of certain PDF files does not work with "fit-to-page" because of wrong BoundingBox values in the PostScript

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Oct 28 16:53:35 PDT 2015


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

William Bader <williambader at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |williambader at hotmail.com

--- Comment #12 from William Bader <williambader at hotmail.com> ---
Created attachment 119266
  --> https://bugs.freedesktop.org/attachment.cgi?id=119266&action=edit
alternate patch by Adrian Johnson

This is an alternate patch submitted to the poppler mailing list by Adrian
Johnson on Oct 27. He added the text below.

==========

I've reviewed the patch and have the following comments.

It would have been a lot easier to review (and probably would have been
reviewed earlier) if you avoided the unnecessary changes to convert
if-else statements to case statements. Putting code style changes in a
separate patch to the bug fix makes reviewing changes much easier.

+ int(pbbty),
+ int(width * xScale + pbbtx + 0.5),

Using floor() and ceil() would be better and would make the code easier
to understand.

You appear to be ignoring the value of tx and ty prior to centering
calculations. What happens if tx and ty are non zero at this point? I
would be more comfortable with the patch if the page bbox calculations
used the exact same transformation as is output to PS.

I'm attaching a new patch that I think is a lot easier to understand. It
uses the same transformation as is output to PS to calculate the
bounding box.

-- 
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/20151028/4def70df/attachment.html>


More information about the Poppler-bugs mailing list