Hi,
the attached patch fixes a bug in poppler-qt that caused it to return wrong
page sizes for certain documents. Backport from the qt4 bindings.
Greetings,
Wilfried Huss
Index: poppler-page.cc
===================================================================
RCS file: /cvs/poppler/poppler/qt/poppler-page.cc,v
retrieving revision 1.16
diff -u -b -r1.16 poppler-page.cc
--- poppler-page.cc 25 Jun 2006 10:29:22 -0000 1.16
+++ poppler-page.cc 13 Aug 2006 10:12:11 -0000
@@ -186,8 +186,14 @@
QSize Page::pageSize() const
{
- ::Page *p = data->doc->data->doc.getCatalog()->getPage(data->index + 1);
- return QSize( (int)p->getMediaWidth(), (int)p->getMediaHeight() );
+ ::Page *p;
+
+ p = data->doc->data->doc.getCatalog()->getPage(data->index + 1);
+ if ( ( Page::Landscape == orientation() ) || (Page::Seascape == orientation() ) ) {
+ return QSize( (int)p->getCropHeight(), (int)p->getCropWidth() );
+ } else {
+ return QSize( (int)p->getCropWidth(), (int)p->getCropHeight() );
+ }
}
Page::Orientation Page::orientation() const
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler