[poppler] PNG images for pdftohtml: patch

Albert Astals Cid aacid at kde.org
Wed Oct 1 13:26:17 PDT 2008


A Dimecres 01 Octubre 2008, Warren Toomey va escriure:
> All, apologies for the noise on the list.

You are not making noise, you are adding content, that's VERY different.

> The attached patch adds PNG 
> output to pdftohtml for non-DCT images, replacing the code that I submitted
> as
> http://lists.freedesktop.org/archives/poppler/2008-September/004113.html.
> The patch also ensures that pdftohtml inserts the correct image filename in
> the <img src=""> output.

Some comments:

Any reason why we need GooList * HtmlOutputDev::imgList instead of the old way 
of dealing with filenames?

i think you modified the header too, that's not in the diff.

+    for(int i = 0; i < HtmlOutputDev::imgList->getLength(); i++) {
+      fName= (GooString *)HtmlOutputDev::imgList->del(0);
+      fprintf(f,"<IMG src=\"%s\"><br>\n",fName->getCString());
+      delete fName;
+    }

That's wrong, you'll never process the file with index 1, you either do not 
increment i or do not remove things from the list, but if you do both, it 
won't work.

Is the PNG code by Guillaume Cottenceau GPLv2 or later compatible?

> The utils/Makefile will need to be patched to include -lpng, and the config
> system tweaked to search for libpng and define ENABLE_LIBPNG if it exists.

Any chance you can do that?

Albert

>
> I will resubmit my reflow patch soon, and then I'll go quiet :)
>
> Thanks,
> 	Warren




More information about the poppler mailing list