Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


pdftohtml -c document.pdf output.htm

this returns the normal output but the background images are of such low quality they cannot be read.

Is this a bug with pdftohtml or can I change a config file somewhere?

any help would be much appreciated, cheers :)

running: Ubuntu 10.04 LTS

share|improve this question

I am not quite sure but see if your problem is due to this bug

That said what you are doing even without bugs, is fraught with potential output disasters, PDF is a complex document format usually not intended to be converted to other formats, it is principally for display and printing as is.

Text and picture extraction is easy with the same tool you mentioned without the -c switch which tries to preserve the look of the original PDF,

I would say try to convert without using the -c switch,this will likely get you good enough images but the layout may not be what you want, but maybe you could create something to fix it up. you may not have to fix anything if the PDF is simple.

share|improve this answer

I'm not sure if you can configure it, but you could try using Openoffice with the pdf-import extension to do your conversions.

share|improve this answer
Thanks for the response. But I'm looking to use it on a webserver, with a php script calling pdftohtml. This is a lightweight approach and OpenOffice sounds clunky – Jake Mar 28 '11 at 19:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.