metebalci / pdftitle

a utility to extract the title from a PDF file
GNU General Public License v3.0
131 stars 21 forks source link

Title from incomplete file #3

Closed impredicative closed 5 years ago

impredicative commented 5 years ago

Is it somehow possible to get a title from an incomplete file? This currently doesn't work. I assume the title is toward the top of a file, so an entire file shouldn't really be necessary. This will prevent needless full downloads of large files.

metebalci commented 5 years ago

It only uses the first page, but I am not sure if whole file (always or sometimes) need to be traversed for this. You can test it I think.

metebalci commented 5 years ago

While trying something else, I saw pdfminer is using seek, so it may not be possible to use streaming data or at least not easily.