[Poppler-bugs] [Bug 30692] [PATCH] pdftops does not crop

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Dec 1 12:48:38 PST 2012


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

--- Comment #18 from William Bader <williambader at hotmail.com> ---
>I suggested that PSOutputDev::startPage generates the cropbox with the given box in the state

I think that with the patch, the postscript clip is generated by calls in
Gfx::Gfx() when Page::createGfx() calls new Gfx().

I agree that my patch is hacky.  So I understand, you want to keep Gfx::Gfx()
and have PSOutputDev::startPage() generate the clip line?

Can startPage() use page->getCropBox() ?  That would save passing it.

Gfx::Gfx() calls 
  out->startPage(pageNum, state);
  out->setDefaultCTM(state->getCTM());
before calling
  out->clip(state);
so that the CTM is initialized before generating the clip.

If PSOutputDev::startPage() sets up the clip, it would be generated before the
CTM is initialized. Is that a problem?

Since Page::createGfx() is generic to all output, while
PSOutputDev::startPage() is specific to postscript, would moving the patch from
createGfx() to startPage() mean other devices that wanted to crop to the
cropbox would need to implement it in their own startPage()>

William

-- 
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/20121201/0a35a58d/attachment.html>


More information about the Poppler-bugs mailing list