You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tested many PDF-to-text programs, and this one is the most robust. However, handling images is always a question since they are heavy objects and usually unnecessary. If I am correct, starting from version 0.7, GROBID dropped the option of extracting images.
I suggest adding an option to save the byte location of image elements instead of saving the image to disk. In this case, we can later read the image directly from the PDF file whenever needed instead of storing all images on the disk.
Implementing this feature should be trivial since the location and length of the image objects are already known to pdfalto.
The text was updated successfully, but these errors were encountered:
Using the byte location in the PDF as alternative seems a good idea for pdfalto! This could be used then by Grobid for example. I don't know if it can be portable and how exactly doing it, I will look at it.
This actually should be done in xpdf rather than pdfalto itself. I am not a C++ expert, but I am a little bit familiar with xpdf, as I tweaked it for a project.
Since images are stored as stream objects in PDF, xpdf fetches and writes them by str = ((DCTStream *)str)->getRawStream(); line in ImageOutputDev.cc. Therefore, we need to add a new function of, say, getStreamBoundaries in Stream.cc to return the location/length of the object instead of its content.
I think the existing function of getStreamIndex defined in Parser.h does part of the job.
I have tested many PDF-to-text programs, and this one is the most robust. However, handling images is always a question since they are heavy objects and usually unnecessary. If I am correct, starting from version 0.7, GROBID dropped the option of extracting images.
I suggest adding an option to save the byte location of image elements instead of saving the image to disk. In this case, we can later read the image directly from the PDF file whenever needed instead of storing all images on the disk.
Implementing this feature should be trivial since the location and length of the image objects are already known to pdfalto.
The text was updated successfully, but these errors were encountered: