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
Thanks for all the answers.
My problem is really with the POCO library I'm using, I'll have to check that.
The output of qDebug left me confused and in doubt, but I wrote this code
confirmed that Qt code was correct from the beginning:
QFile file(/home/marcelo/Documents/Test.pdf);
if
Am 28.02.2014 um 08:48 schrieb Scott Aron Bloom scott.bl...@onshorecs.com:
However, there are Qt base libraries.. QtExt for instance, that do allow the
attachments from QByteArray, and they do all the computation into Base64
hidden from the user.
Or in just one line:
So that they can understand, I need to put the contents of a pdf file into a
QByteArray, as this QByteArray is used as an attachment in the email sending
process.
I did a test with a postscript file (.ps file) and it worked perfectly. I only
have this problem with pdf files.
How can I read
If you want to test sending en email, send it an check what happens. Or,
at least, print the final (i.e. with all encoding and other things being
done, exactly what you'd send to an SMTP server) message. Don't try to
print a PDF file contents as is — it's not a 100% text-based format
and may
Em sex 28 fev 2014, às 01:58:39, Marcelo Estanislau Geyer escreveu:
So that they can understand, I need to put the contents of a pdf file into a
QByteArray, as this QByteArray is used as an attachment in the email
sending process.
I did a test with a postscript file (.ps file) and it worked
Estanislau Geyer estanisge...@hotmail.com
To: interest@qt-project.org interest@qt-project.org
Sent: Thursday, February 27, 2014 8:58 PM
Subject: Re: [Interest] PDF to QByteArray
So that they can understand, I need to put the contents of a pdf file into a
QByteArray, as this QByteArray is used
Am 28.02.2014 um 02:58 schrieb Marcelo Estanislau Geyer
estanisge...@hotmail.com:
So that they can understand, I need to put the contents of a pdf file into a
QByteArray, as this QByteArray is used as an attachment in the email sending
process.
What makes you think you can attach any
@qt-project.org] On Behalf Of
Till Oliver Knoll
Sent: Thursday, February 27, 2014 11:00 PM
To: Qt Project
Subject: Re: [Interest] PDF to QByteArray
Am 28.02.2014 um 02:58 schrieb Marcelo Estanislau Geyer
estanisge...@hotmail.commailto:estanisge...@hotmail.com:
So that they can understand, I need
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
It's possible load pdf file to QByteArray? The simple code below is not work:
But your code works perfectly. You successfully loaded the pdf file into your
QByteArray. But I suppose what you really wanted, is that your document is
rendered.
Sorry, QByteArray is no pdf renderer.
Maybe this
Am 26.02.2014 04:02, schrieb Marcelo Estanislau Geyer:
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 =
12 matches
Mail list logo