ExifTool Forum

General => Metadata => Topic started by: JpPamplona on November 14, 2017, 12:54:55 PM

Title: Extract first line of pdf file and put as title
Post by: JpPamplona on November 14, 2017, 12:54:55 PM
Hello guys,

is there a way of getting the first line of many pdf files and put it as theirs title metadata?

Thanks!
Title: Re: Extract first line of pdf file and put as title
Post by: Phil Harvey on November 14, 2017, 02:04:26 PM
Sorry, ExifTool doesn't have the ability to decode the displayed content of a PDF document.

- Phil
Title: Re: Extract first line of pdf file and put as title
Post by: Hayo Baan on November 15, 2017, 03:58:30 PM
Exiftool can't do this, but with a little bit of regular expression and scripting magic, perhaps you can achieve what you want to do with e.g. ps2ascii (tool to extract text from a PDF, part of Ghostscript). I use this to automatically move some PDFs I receive regularly to a dedicated folder on my system.