English 中文(简体)
Extract everything from PDF [closed]
原标题:

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Looking for solution to extract content from a PDF file (using console tool or a library).

It will be used on server to produce on-line e-books from uploaded PDF files.

Need to extract following things:

  1. text with fonts and styles;
  2. images;
  3. audio and video;
  4. links and hotspots.
  5. page snapshots and thumbnails;
  6. general PDF information, e.g. book layouts, number of pages etc.

Looking at Adobe PDF Library ($5000 though), BCL SDK (?), PDFLib (€795), QuickPDF ($250)

Now we are using open source pdf2xml (extracts text, images and links) and GhostScript (snapshots and thumbnails). The other things left are:

  1. fonts;
  2. multimedia;
  3. hotspots;
  4. page info.

We are hesitating between paying a lot of money (and possibly make mistake choosing wrong solution) or use free/open source solutions.

Which BEST solution to extract nearly everything from PDF would you recommend?

Any comments will be much appreciated.

最佳回答

Sounds like with a few days or weeks effort, you can adapt the open source tools to your needs. Fonts and everything can certainly be extracted, this is something that every PDF reader must do anyway to display them.

You should probably take an estimate of programmer costs ($/hr) and multiply it by the estimated time it would take to add the needed open source functionality (60-80 hours?). If this is greater or close to $5000 anyway, you might consider just buying the commercial software.

Otherwise, with the help of the (quite good) PDF reference, you should be well on your way.

One more thing, you might find Poppler to be of help. It is for rendering PDF, but that is very related to what you are trying to do.

问题回答

A: Font: I dont think fonts can be extracted.

B: Not sure about multimedia

C: What are hotspots?

D: Have a look at iTextSharp (open source), you might be able to extract more page info.

There is also PDF Suite that contains 3 SDKs especially designed to extract content from PDF, render PDF as image and convert to html. Though no font files extraction but it supports XML output and text extraction preserving the original layout.

There is a "PDF Multitool" free utility that is based on this engine so you play with it to see how it works for PDF files you have.

Disclaimer: I work for ByteScout

Yes, you can extract the texts, text style information, images, link annotations, bookmarks and even you can get the paragraph id information, except the tables. Check this link.

http://www.pdftron.com/pdfnet/index.html

It really works fine.

tika http://tika.apache.org/ Its advantage is to extract text from multi types. but it can solve your problem as well.

For the implementation: The goal of Tika is to reuse existing parser libraries like PDFBox or Apache POI as much as possible, and so most of the parser classes in Tika are adapters to such external libraries.

I think tika may work as you describe. Extract things with categeries. (Will add more code later.)


Not an exact answer yet.





相关问题
Using QCView and iSight to capture image

I have a QCView that loads a Quartz file which gives you iSights feedback (basically like a QTCaptureView) Everything displays fine The button simply takes a snapshot using the following simple ...

Taking picture with QTCaptureView

Is it possible to simply take a picture and save it somewhere using a QTCaptureView and Apple s built-in iSight? I ve seen lots of tutorials on recording video but none on simply taking a picture. Any ...

Transform rectangular image into trapezoid

In .NET how can I transform an image into a trapezoid. The Matrix class supports rotation, shear, etc, but I can t see a trapezoidal transformation. I m using the usual System.Drawing.* API, but I m ...

Rotate image through Y-axis on web page

What are my options for rotating an image on a web page through the Y-axis? I m not sure if I even have the terminology right. Is this called a rotate or a transform. Most of the searches that I ve ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

Editing a xaml icons or images

Is it possible to edit a xaml icons or images in the expression design or using other tools? Is it possible to import a xaml images (that e.g you have exported) in the expression designer for editing?...

Convert from 32-BPP to 8-BPP Indexed (C#)

I need to take a full color JPG Image and remap it s colors to a Indexed palette. The palette will consist of specific colors populated from a database. I need to map each color of the image to it s "...

热门标签