Bug 32410

Summary: Zoom not working in pdftohtml
Product: poppler Reporter: sebastien.prudhomme
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

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.