Poppler Qt4 接口类库
jopen
13年前
Poppler Qt4 接口类库,libpoppler-qt4,一个类库能够让QT4应用程序轻松加载和展示PDF文件。 <pre class="brush:cpp; toolbar: true; auto-links: false;">// Paranoid safety check if (document == 0) { // ... error message ... return; } // Access page of the PDF file Poppler::Page* pdfPage = document->page(pageNumber); // Document starts at page 0 if (pdfPage == 0) { // ... error message ... return; } // Generate a QImage of the rendered page QImage image = pdfPage->renderToImage(xres, yres, x, y, width, height); if (image.isNull()) { // ... error message ... return; } // ... use image ... // after the usage, the page must be deleted delete pdfPage;</pre> <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1326725498077" target="_blank">http://www.open-open.com/lib/view/home/1326725498077</a></p>