#1 2015-02-26 08:22

nkormanik
Member
From: Salt Lake City
Registered: 2015-02-26
Posts: 24

PDF Meta Tags such as 'Title'

Denis,

Greetings.  I’m trying to rename a set of PDF files that have short names of random numbers. 

I see that each PDF file has a built-in proper TITLE, which, I suppose, is technically a ‘meta tag.’

I note that ReNamer has support for many different ‘meta tags.’  However none for PDF files.

Why not?

Can you possibly add support for PDF meta tags?

Same goes for epub files.  Please add support for epub meta tags as well.

Thanks much,
Nicholas Kormanik

Offline

#2 2015-02-26 20:35

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: PDF Meta Tags such as 'Title'

The PDF stream format really borders on incomprehensible gobbledygook, but maybe there is a free third party library to access PDF tags like the one already used by ReNamer for FLACs.

Last edited by Andrew (2015-03-01 20:06)

Offline

#3 2015-02-27 01:30

nkormanik
Member
From: Salt Lake City
Registered: 2015-02-26
Posts: 24

Re: PDF Meta Tags such as 'Title'

I've noticed, too, that many PDF files do not have 'Titles' included in them.

Bummer.

How about adding support for EPUBs??

Offline

#4 2015-03-01 19:57

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: PDF Meta Tags such as 'Title'

nkormanik wrote:

I've noticed, too, that many PDF files do not have 'Titles' included in them.

Of course there's no guarantee of metadata in any file, so in such cases the metadata library used should return an empty string or NULL or similar to ReNamer.

BTW, PDF metadata extraction has already been discussed in this thread.

_____

EPUBs are actually renamed ZIP archives, so if you change their extension back to ZIP and open them you'll find a content.opf file (not necessarily in the root directory of the archive though). This OPF (Open Packaging Format) is an XML file that contains among other things Dublin Core Metadata such as:

<?xml version="1.0" encoding="utf-8"?>
<package>
  <metadata>
    <dc:publisher>...</dc:publisher>
    <dc:language>...</dc:language>
    <dc:creator>...</dc:creator>
    <dc:title>...</dc:title>
  </metadata>
</package>

I don't think it would be worthwhile for Denis to create his own EPUB/OPF parser, so again if there's a good free third party Free Pascal library (whose license terms allow usage in commercial software like ReNamer Pro) available that'll let him access the metadata easily then he may perhaps incorporate that into ReNamer.

Last edited by Andrew (2015-03-01 21:19)

Offline

#5 2015-03-02 11:02

nkormanik
Member
From: Salt Lake City
Registered: 2015-02-26
Posts: 24

Re: PDF Meta Tags such as 'Title'

Well, great work.  Keep at it.  Thanks much!

Offline

#6 2015-03-02 11:13

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,370

Re: PDF Meta Tags such as 'Title'

You should also check this Wiki article:
http://www.den4b.com/wiki/ReNamer:Scripts:Xpdf

It documents how to use Xpdf command line tool to extract tags from PDF files and use them inside ReNamer.

Offline

Board footer

Powered by FluxBB