<div dir="ltr"><div><div><div>Hi to all<br><br></div><div>I am new user to poppler and I have a short question.<br><br></div><div>In my small program I use these lines:<br><br>for (int i = 0; i < pages; ++i) {<br> cout << "Page " << (i + 1) << "/" << pages << ":" << endl;<br>
auto_ptr<poppler::page> p(doc->create_page(i));<br> poppler::byte_array text_ba = p.get()->text(p->page_rect(), poppler::page::raw_order_layout).to_utf8();<br> text_ba.push_back(0); // Add a NULL terminator for the C char *<br>
string text( text_ba.begin(), text_ba.end() );<br> cout << text << endl;<br> }<br><br></div><div>to print text of file pdf, but using 'raw_order_layout' or 'physical_layout' the output is different if I use the command 'pdftotext filename.pdf -'.<br>
<br></div><div><br></div>How I can show text (but written in a pointer of char) as command 'pdftotext filename.pdf -' ?<br><br></div><div>Thank<br></div><div><br></div><div><br></div><br> </div></div>