[Interest] PDF to QByteArray
Marcelo Estanislau Geyer
estanis at outlook.com
Wed Feb 26 04:01:01 CET 2014
It's possible load pdf file to QByteArray? The simple code below is not work:
QFile file("/home/marcelo/Documents/test.pdf");
if (!file.open(QIODevice::ReadOnly)) { qDebug() << "file open error";
return;}
QByteArray ba_pdf = file.readAll();
qDebug() << ba_pdf;
file.close();
The output is:"%PDF-1.4
1 0 obj<<
/Title (þÿ)
/Creator (þÿ)
/Producer (þÿ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140226/186cbc57/attachment.html>
More information about the Interest
mailing list