Bug 32410 - Zoom not working in pdftohtml
Summary: Zoom not working in pdftohtml
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-15 05:59 UTC by sebastien.prudhomme
Modified: 2010-12-16 16:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description sebastien.prudhomme 2010-12-15 05:59:17 UTC
Hi,

Just to let you know that zoom parameter is not working at all in pdftohtml.

After comparing the Poppler version of pdftohtml to the original one on http://sourceforge.net/projects/pdftohtml/, i think that this patch is needed:

--- poppler-0.15.3/utils/pdftohtml.cc.rmap      2010-12-15 13:18:31.000000000 +0100
+++ poppler-0.15.3/utils/pdftohtml.cc   2010-12-15 13:26:46.000000000 +0100
@@ -401,7 +401,7 @@

   if (htmlOut->isOk())
   {
-    doc->displayPages(htmlOut, firstPage, lastPage, 72, 72, 0,
+    doc->displayPages(htmlOut, firstPage, lastPage, static_cast<int>(resolution*scale), static_cast<int>(resolution*scale), 0,
                      gTrue, gFalse, gFalse);
        if (!xml)
        {
@@ -460,7 +460,7 @@
       psOut = new PSOutputDev(psFileName->getCString(), doc, doc->getXRef(),
           doc->getCatalog(), NULL, firstPage, lastPage, psModePS, w, h);
       psOut->setDisplayText(gFalse);
-      doc->displayPages(psOut, firstPage, lastPage, 72, 72, 0,
+      doc->displayPages(psOut, firstPage, lastPage, static_cast<int>(resolution*scale), static_cast<int>(resolution*scale), 0,
           gTrue, gFalse, gFalse);
       delete psOut;

I've tested it successfully in my environment.

Regards
Comment 1 Albert Astals Cid 2010-12-16 16:37:53 UTC
Thanks for reporting, should be fixed in poppler >= 0.16.0


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.