Commit 52af89d8 authored by Brad Hards's avatar Brad Hards
Browse files

Update to reflect changes to rendering API.

parent d42998d0
...@@ -51,10 +51,10 @@ int main( int argc, char **argv ) ...@@ -51,10 +51,10 @@ int main( int argc, char **argv )
doc->okToAddNotes(); doc->okToAddNotes();
doc->pageMode(); doc->pageMode();
QPixmap *pixmap = new QPixmap;
for( int index = 0; index < doc->numPages(); ++index ) { for( int index = 0; index < doc->numPages(); ++index ) {
Poppler::Page *page = doc->page( index ); Poppler::Page *page = doc->page( index );
page->renderToPixmap(&pixmap, page->pageSize()); QPixmap *pixmap = new QPixmap(page->pageSize());
page->renderToPixmap(pixmap);
page->pageSize(); page->pageSize();
page->orientation(); page->orientation();
std::cout << "."; std::cout << ".";
......
...@@ -24,7 +24,8 @@ PDFDisplay::PDFDisplay( Poppler::Document *d ) ...@@ -24,7 +24,8 @@ PDFDisplay::PDFDisplay( Poppler::Document *d )
if (doc) { if (doc) {
Poppler::Page *page = doc->page("1"); Poppler::Page *page = doc->page("1");
if (page) { if (page) {
page->renderToPixmap(&pixmap, page->pageSize()); pixmap = new QPixmap(page->pageSize());
page->renderToPixmap(pixmap);
delete page; delete page;
} }
} else { } else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment