metebalci / pdftitle

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

Get title from bytes #2

Closed impredicative closed 5 years ago

impredicative commented 5 years ago

Currently, the get_title function allows getting the title from a path to a file. I'd like to be able to get the title from a bytes object instead. It should be easy to allow the code to also do this. Currently I'm having to create my own modified get_title function, duplicating most of its functionality, and this is too hacky. Thanks.

metebalci commented 5 years ago

Done with version 0.2 . get_title_from_io can be used, bytes can be wrapped into a BytesIO. not tested.