[Poppler-bugs] [Bug 94517] page.text() does not take page orientation into account

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Dec 8 08:10:51 UTC 2016


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

--- Comment #4 from Jeroen Ooms <jeroen.ooms at stat.ucla.edu> ---
This issue is still not fixed. I am now using a workaround in my applications
that doubles the width for landscape pages.

    page *p(doc->create_page(i));

    /* Workaround for bug https://github.com/ropensci/pdftools/issues/7 */
    rectf target(p->page_rect());
    if(p->orientation() == page::landscape || p->orientation() ==
page::seascape){
      target.set_right(target.right() * 2);
    }

    /* Extract text */
    ustring str = p->text(target, page::physical_layout);

This is pretty ugly but it seems to at least get the text out of it.

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


More information about the Poppler-bugs mailing list