--- poppler-page.cpp 2017-11-12 19:14:32.000000000 +0100 +++ new_poppler-page.cpp 2017-11-18 14:13:48.664450677 +0100 @@ -269,8 +269,9 @@ ustring page::text(const rectf &r, text_layout_enum layout_mode) const { std::unique_ptr s; - const GBool use_raw_order = (layout_mode == raw_order_layout); - TextOutputDev td(0, gFalse, 0, use_raw_order, gFalse); + const GBool use_raw_order = (raw_order_layout == layout_mode); + const GBool use_physical_layout = (physical_layout == layout_mode); + TextOutputDev td(0, use_physical_layout, 0, use_raw_order, gFalse); d->doc->doc->displayPage(&td, d->index + 1, 72, 72, 0, false, true, false); if (r.is_empty()) { PDFRectangle *rect = d->page->getCropBox();