0

I need to build a tool that takes text and images from pdf and renders it in a responsive HTML file. I don't need to keep the positioning of the elements, but the ordering is important.

The problem I'm facing is text and images extraction from pdf files.

I've tried a few tools that transform pdf to html, but those are more oriented on the visual reproduction of the file (absolute positioning, paragraphs broken into lines). I need something to provide me a feed of paragraphs and images.

Any ideas for that? I don't mind looking into paid tools also.

Thank you!

  • What kind of content are you dealing with? Magazines, academic journals, text books, newspapers, financial statements? The reason you are having a hard time finding a solution, is that how do you make a reflowable HTML out of a school geography textbook? Or a magazine? The images, the text font and size, are often tightly coupled together, and breaking that would make gibberish. On the other hand, an academic paper is much simpler, though you still need to figure out columns, and paragraphs, so not trivial. – Ryan Dec 13 '16 at 19:37
1

If a commercial SDK is an option for you, you can check out the LEADTOOLS Document Converter. Disclaimer: I am an employee of this product

The Document Converter SDK from LEADTOOLS lets you convert to and from any document or raster image format such as:

  • Adobe Acrobat PDF and PDF/A Microsoft Office DOC/DOCX, XLS/XLSX,
  • PPT/PPTX, PST, EML, MSG, and XPS formats CAD formats such as DXF,
  • DWG, and DWF TIFF, JPEG, PNG, EXIF, BMP, and hundreds more raster
  • image formats Plain Text, RTF, HTML, MOBI, ePUB, and more IBM AFP,
  • MO:DCA, IOCA, and PTOCA

There is also a free 60-day evaluation so that you can try it out before purchasing.

Disclaimer: I am an employee of this product

0

The Apache pdfbox app can extract both test and imagets from PDF documents. It is free software and easy to use.

https://pdfbox.apache.org/1.8/commandline.html

0

PDFMate PDF Converter Free can do that. Launch the program, choose TXT as the output format and then click button "Convert".

0

Disclaimer : I work for Datalogics as a Product Manager responsible for building products like this.

There are a number of tools out there that are built to convert PDF to HTML already, do you really need to build one yourself? Or are you looking for something that does exactly what you want? The requirements are a little vague.

If you are looking to build something though, do yourself a favor and get a reliable SDK for working with PDFs and work through extracting the text and images. There are a number of SDKs out there that can help you with this (in alphatbetical order by company name)

If you are looking for a tool that does the PDF to HTML conversion for you that should get you 90% of the way there based on what you asked about take a look at our PDF Alchemist product. It does not use absolute positioning and reconstructs the text in reading order (even if that is not how it is stored in the PDF). The other option is PDFix, I don't remember if they use absolute positioning or not (or if there is an option to turn off absolute positioning).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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