Custom 'SourceType' field name becomes 'Source Type' (space added by exiftool)

Started by JRocchio, August 10, 2023, 02:36:38 PM

Previous topic - Next topic

JRocchio

Struggling with this all morning. I need to have a custom field named "SourceType." I've defined it in my .ExifTool.config file (see below) but it appears that internally exiftool has used the capital T as a signal to insert a blank space in the name. The result is that the app I am importing my PDFs into won't pick up the metadata intended for it's 'SourceType' metadata property.

I feel I must be missing something about why this is happening...but what?

%Image::ExifTool::UserDefined = (
    'Image::ExifTool::XMP::pdfx' => {
        Books => { },
        Key => { },
        Album => { },
        Signature => { },
        SourceType => { },
        Duration => { },
        Year => { },
    },
    'Image::ExifTool::PDF::Info' => {
        Books => { List => 'string' },
        Key => { List => 'string' },
        Album => { List => 'string' },
        Signature => { List => 'string' },
        SourceType => { },
        Duration => { },
        Year => { },
    },
);
1;  #end

Result of applying this field to a PDF doc (using 'SourceTypeField' for the field's value):

[PDF]           Source Type                     : SourceTypeField
[XMP]           Source Type                     : SourceTypeField



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 ($).

StarGeek

Also see the -s (-short) option.

Quote from: JRocchio on August 10, 2023, 02:36:38 PMThe result is that the app I am importing my PDFs into won't pick up the metadata intended for it's 'SourceType' metadata property.

Is this an app you've created or is it an already existing freeware/commercial app?  If the latter, then you're making the assumption that it can read your custom tag.  Programs are extremely unlikely to be able to read data that don't know about.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

JRocchio

Quote from: Phil Harvey on August 10, 2023, 02:48:06 PMSee FAQ 2.

Ah!, yes. with exiftool -a -G0 -s 210_TEST_Score_F_ListFields.pdf it shows as 'SourceType.' Thanks Phil.