File remains unchanged after writing to tag.

Started by jkohut, November 25, 2013, 01:30:15 PM

Previous topic - Next topic

jkohut

Hello,
I'm very new to exiftool and was looking to add a few tag values to pdf files but it seems the file never is updated using exiftool. 

The pdf file does not have a Copyright value when I output the tags to the console, however the following code always results in the file being unchanged.

exiftool -Copyright="Notice: This material may be protected by copyright law (U.S. Code Title 17)" sn83016829-1911-05-06-01-00-0008.pdf
    0 image files updated
    1 image files unchanged


As far as I can tell Copyright is a valid tag with no value, what am I missing to update the file with this tag and value?

Thanks,
Jay

Phil Harvey

Hi Jay,

You have the correct command.  This should work.  Two questions:

1) what exiftool version is this?

2) what is the console output if you add -v2 to this command?

Also, I think you should be writing XMP:Rights instead of Copyright, but that doesn't explain the problem.

Better yet, if you could email me the PDF and the exact command you are using, then I can try to reproduce the problem. (philharvey66 at gmail.com)

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

jkohut

Hi Phil,
1) The version I am running on Unbuntu linux is:
exiftool -ver
7.89 [Warning: Library version is 9.27]


2) Adding the -v2 option to the end of the command produces,
exiftool -Copyright="Notice: This material may be protected by copyright law (U.S. Code Title 17)" -v2 sn83016829-1911-05-06-01-00-0008.pdf
Writing MIE-Doc:Copyright
Writing PNG:Copyright
Writing Ducky:Copyright if tag exists
Writing PostScript:Copyright
Writing Pentax:Copyright if tag exists
Writing XMP-xmpDM:Copyright if tag exists
Writing XMP-tiff:Copyright if tag exists
Writing XMP-pur:Copyright if tag exists
Writing XMP-prism:Copyright if tag exists
Writing XMP-pdf:Copyright if tag exists
Writing IFD0:Copyright
======== sn83016829-1911-05-06-01-00-0008.pdf
Rewriting sn83016829-1911-05-06-01-00-0008.pdf...
  Rewriting XMP
Nothing changed in sn83016829-1911-05-06-01-00-0008.pdf
    0 image files updated
    1 image files unchanged


I should be able to email you the file and the command.  I very much appreciate the help.

Thanks,
Jay

Phil Harvey

Wow, that's a wicked version sheer.  I suggest that you update both the libraries and the application to the same (recent) version.

I'm sort of surprised that it doesn't barf badly running a 4-year-old application with a newer set of libraries.  I guess that is a testament to the stability of the API.

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

jkohut

Hi Phil,
I upgraded the version to the latest and it still seems to have trouble actually updating the file. 

Below is the output of a version check followed by the attempt to update the Copyright tab.

emu-ucoi@duck[67] exiftool -ver
9.27
emu-ucoi@duck[68]  exiftool -Copyright="Notice: This material may be protected by copyright law (U.S. Code Title 17)" -v2 sn83016829-1911-05-06-01-00-0008.pdf
Writing MIE-Doc:Copyright
Writing PNG:Copyright
Writing Ducky:Copyright if tag exists
Writing PostScript:Copyright
Writing Pentax:Copyright if tag exists
Writing XMP-xmpDM:Copyright if tag exists
Writing XMP-tiff:Copyright if tag exists
Writing XMP-pur:Copyright if tag exists
Writing XMP-prism:Copyright if tag exists
Writing XMP-pdf:Copyright if tag exists
Writing IFD0:Copyright
======== sn83016829-1911-05-06-01-00-0008.pdf
Rewriting sn83016829-1911-05-06-01-00-0008.pdf...
  Rewriting XMP
Nothing changed in sn83016829-1911-05-06-01-00-0008.pdf
    0 image files updated
    1 image files unchanged


Thanks,
Jay

Phil Harvey

Hi Jay,

I got the file, thanks.  Your command should work with version 9.40 or later.  But the version you have now will work if you specify XMP:Copyright instead of just Copyright (or better, as I recommended, XMP:Rights).  Version 9.40 was changed so that XMP is now the default group for PDF files.  Before that, just specifying Copyright would try to write EXIF:Copyright, which results in nothing being written to a PDF file as you observed.

I hope this makes sense.

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

jkohut

Hi Phil,
That worked!  Thank you for your help in this.

-- Jay

frairep

HI Phil!

I'm not sure if it is correct to reopen this topic, but as it is the same problem seems OK.

I browsed the topic and checked the recommendations but still got the problem.

C:\Users\Picassa_OSMC\Documents>exiftool -ver
12.01



C:\Users\Picassa_OSMC\Documents>exiftool -keywords z:\A_imprimir\Familiar_0a\IMG_3409.jpg
Keywords                        : Micaela Fraire


C:\Users\Picassa_OSMC\Documents>exiftool  -keywords= z:\A_imprimir\Familiar_3\IMG_3409.jpg -v2
Deleting PDF:Keywords
Deleting MIE-Doc:Keywords
Deleting PostScript:Keywords
Deleting Keys:Keywords
Deleting XMP-acdsee:Keywords
Deleting XMP-pdf:Keywords
Deleting XMP-xmp:Keywords
Deleting IPTC:Keywords
======== z:/A_imprimir/Familiar_3/IMG_3409.jpg
Rewriting z:/A_imprimir/Familiar_3/IMG_3409.jpg...
  Editing tags in: APP1 APP13 IPTC Keys MIE-Doc PDF Photoshop PostScript XMP
  Creating tags in:
JPEG APP1 (17324 bytes):
JPEG APP1 (6837 bytes):
  Rewriting XMP
    [XMP rewritten with no changes]
JPEG APP2 (3158 bytes):
JPEG APP13 (16598 bytes):
  Rewriting Photoshop
  Rewriting IPTC
JPEG APP14 (12 bytes):
JPEG DQT (130 bytes):
JPEG DRI (2 bytes):
JPEG SOF0:
JPEG DHT (192 bytes):
JPEG SOS
Nothing changed in z:/A_imprimir/Familiar_3/IMG_3409.jpg
    0 image files updated
    1 image files unchanged


And

C:\Users\Picassa_OSMC\Documents>exiftool  -XMP-acdsee:Keywords= z:\A_imprimir\Familiar_3\IMG_3409.jpg -v2
Deleting XMP-acdsee:Keywords
======== z:/A_imprimir/Familiar_3/IMG_3409.jpg
Rewriting z:/A_imprimir/Familiar_3/IMG_3409.jpg...
  Editing tags in: APP1 XMP
  Creating tags in:
JPEG APP1 (17324 bytes):
JPEG APP1 (6837 bytes):
  Rewriting XMP
    [XMP rewritten with no changes]
JPEG APP2 (3158 bytes):
JPEG APP13 (16598 bytes):
JPEG APP14 (12 bytes):
JPEG DQT (130 bytes):
JPEG DRI (2 bytes):
JPEG SOF0:
JPEG DHT (192 bytes):
JPEG SOS
Nothing changed in z:/A_imprimir/Familiar_3/IMG_3409.jpg
    0 image files updated
    1 image files unchanged


C:\Users\Picassa_OSMC\Documents>exiftool -XMP-acdsee:keywords z:\A_imprimir\Familiar_0a\IMG_3409.jpg
Keywords                        : Micaela Fraire


Can you show me the error?

Many thanks!!!

Phil Harvey

Where are the Keywords stored?:

exiftool -G1 -keywords FILE

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

StarGeek

The last command specifically requests -XMP-acdsee:keywords, so at least one copy is stored there, though seeing all locations would be helpful, so maybe
exiftool -G1 -a FILE

Also, maybe run a validate to see if there's a structural problem
exiftool -a -s -validate -warning FILE
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

frairep

Here you have the info.


C:\Users\Picassa_OSMC\Documents>exiftool -G1 -keywords  z:\A_imprimir\Familiar_0a\IMG_3409.jpg
[XMP-acdsee]    Keywords                        : Micaela Fraire

C:\Users\Picassa_OSMC\Documents>exiftool -a -s -validate -warning z:\A_imprimir\Familiar_0a\IMG_3409.jpg
Validate                        : 1 Warning (minor)
Warning                         : [minor] Odd offset for IFD0 tag 0x0132 ModifyDate


This should work!


C:\Users\Picassa_OSMC\Documents>exiftool  -XMP-acdsee:Keywords= z:\A_imprimir\Familiar_3\IMG_3409.jpg
    0 image files updated
    1 image files unchanged



But doesn´t   :(


frairep

I am running exiftool on a win10 machine, but the file is on an raspberry pi 2 with OSMC mounted via SAMBA.

Just in case it is relevant.

Regards!!

Phil Harvey

OK.  We will need a file for testing to be able to determine what is going on.  Can you attach it to a post here?

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

frairep

Sure!

Here you have the example picture I`ve been trying to modify.

By the way, after my lastest post I cheked if was possible to write files in the raspberry mounted disk from the WIN cmd, and was OK.
Just to be sure it wasn´t a permissions problem.

Regards!

frairep

The file is jpeg but fails security check:

Your attachment has failed security checks and cannot be uploaded. Please consult the forum administrator.