PDA

View Full Version : how to read and write pdf



weixj2003ld
7th May 2012, 10:02
I want to read and write a pdf file,how to do?

nibedit
7th May 2012, 12:17
QAxWidget *pPDFWidget;

pPDFWidget = new QAxWidget(this);
pPDFWidget->setControl(QString::fromUtf8("{CA8A9780-280D-11CF-A24D-444553540000}"));

QMessageBox::critical(this,trUtf8("PDF Error"), "Please install Adobe Acrobat Reader (R) for Pdf support!");

pPDFWidget->setProperty("enabled", QVariant(false));

pPDFWidget->setProperty("autoFillBackground", QVariant(false));
pPDFWidget->setProperty("orientation", QVariant(-1));

pPDFWidget->setProperty("geometry", QVariant(QRect(160, 70, 721, 841)));
pPDFWidget->dynamicCall("LoadFile(const QString&)","E:\\Qt\\Qt_LGPL.pdf"); // file path
pPDFWidget->dynamicCall("setShowScrollbars(bool)","false");
pPDFWidget->dynamicCall("setShowToolbar(bool)","false");

Also you can use Poppler to display pdf files.
read more at :
http://doc.qt.nokia.com/qq/qq27-poppler.html

Added after 1 17 minutes:

also u can use PODOFO.
http://podofo.sourceforge.net/about.html#lic

weixj2003ld
7th May 2012, 13:19
The u!
I want to write my contents into a PDF file, how to do?

amleto
7th May 2012, 14:11
http://www.qtforum.org/article/32867/create-pdf-document-in-qt.html