[Interest] PDF to QByteArray
Marcelo Estanislau Geyer
estanisgeyer at hotmail.com
Wed Feb 26 04:02:33 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/35a65f6f/attachment.html>
More information about the Interest
mailing list