[poppler] pdftohtml patch: new reflow option (fixed)

Albert Astals Cid aacid at kde.org
Mon Jan 5 14:17:19 PST 2009


A Dimecres 01 Octubre 2008, Warren Toomey va escriure:
> This patch add the -reflow option to pdftohtml which produces nicer
> HTML output, and replaces the broken patch that I submitted as
> http://lists.freedesktop.org/archives/poppler/2008-September/004115.html
> The patch has no significant effect on -complex and -xml mode, and -nomerge
> still works. The patch also fixes this bugzilla bug for poppler:
> https://bugs.freedesktop.org/show_bug.cgi?id=12522
>
> Thanks,
> 	Warren

And three months later, an answer, sorry for being slower than a turtle with 
no legs.

I see you did 
-       noMerge = gTrue;
+       noMerge = gFalse;
when users asks for xml output, that may suit you better, but i think it would 
be better that xml does no do either forced or unforced paragraph merging, so 
the noMerge line should simply be removed from the if.


@@ -997,7 +998,7 @@
       
       dumpMetaVars(page);
       fprintf(page,"</HEAD>\n");
-      fprintf(page,"<BODY bgcolor=\"#A0A0A0\" vlink=\"blue\" 
link=\"blue\">\n");
+      fprintf(page,"<BODY vlink=\"blue\" link=\"blue\">\n");
     }
   }
   ok = gTrue; 
@@ -1444,11 +1445,11 @@
 	      GooString *str=GooString::fromInt(page);
 	      /* 		complex 	simple
 	       	frames		file-4.html	files.html#4
-		noframes	file.html#4	file.html#4
+		noframes	#4		#4
 	       */
 	      if (noframes)
 	      {
-		  file->append(".html#");
+		  file= new GooString("#");
 		  file->append(str);
 	      }
 	      else

This has nothing to do with reflowing, i guess i can ignore that?

Also i see you do

fputs(reFlow ? "<p>\n" : "<br>\n",f);

But i never see you closing <p> is that correct?

Albert


More information about the poppler mailing list