Custom Tags, understanding how to make them

Started by merrittr, October 14, 2020, 05:55:47 PM

Previous topic - Next topic

merrittr

I am trying to add the followin fields to PDFs in a folder


..\exiftool -Year="1969" Gray_1969.pdf
..\exiftool -PageFrom="" Gray_1969.pdf
..\exiftool -PageTo="" Gray_1969.pdf

this post
https://exiftool.org/forum/index.php?topic=11218.msg60006#msg60006

seems to sugesst I create a file in the Windows 10 file system where exiftool.exe is called
.ExifTool_config

with contents like this :

%Image::ExifTool::UserDefined = (
    'Image::ExifTool::XMP::Main' => {
        xxx => {
            SubDirectory => {
                TagTable => 'Image::ExifTool::UserDefined::xxx',
            },
        },
    },
);

%Image::ExifTool::UserDefined::xxx = (
    GROUPS        => { 0 => 'XMP', 1 => 'XMP-xxx', 2 => 'Image' },
    NAMESPACE     => { 'xxx' => 'http://ns.myname.com/xxx/1.0/' },
    WRITABLE      => 'string',
    Year => { },
    PageFrom=> { },
    PageTo=> { },
);
1;  #end





Is that correct?

Phil Harvey

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

merrittr

OK great once that config is there will

..\exiftool -Year="1969" Gray_1969.pdf
..\exiftool -PageFrom="1" Gray_1969.pdf
..\exiftool -PageTo="100" Gray_1969.pdf

populate them fields?

Phil Harvey

Yes, unless there is an error I didn't see in the config file.  The best way to know is to try it.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

merrittr

#4
Worked!!!

:D

thanks Phil!