Jump to content

Edit PDF metadata: Difference between revisions

From www.ReeltoReel.nl Wiki
Pvdm (talk | contribs)
mNo edit summary
Pvdm (talk | contribs)
 
(9 intermediate revisions by the same user not shown)
Line 4: Line 4:
View specific metadata:
View specific metadata:
  # exiftool -Creator file.pdf
  # exiftool -Creator file.pdf
# find . -type f -iname '*.pdf' -exec exiftool -Creator {} \;


Set metadata:
Set metadata:
  # exiftool -Creator='barbapappa' file.pdf
  # exiftool -Creator='barbapappa' file.pdf
# find . -type f -iname '*.pdf' -exec exiftool -Creator='barbapappa' {} \;
to preserve date/time:
-P
to delete backup file that is created:
-delete_original[!]
# find . -type f -iname '*.pdf' -exec exiftool -P -overwrite_original -Producer='www.bladiebla.nl' -Creator='barbapappa' {} \;
# find . -type f -iname '*.pdf' -exec exiftool -P -delete_original! {} \;
=Edit in one metadatafile=
Make a parameter file
<pre>
-Title=Mijn Titel
-Author=Mijn Naam
-Creator=Microsoft Word
-Producer=Adobe PDF Library 15.0
-Subject=Korte samenvatting
-Keywords=tag1, tag2, tag3
-CreateDate=2025:08:14 08:00:00
-ModifyDate=2025:08:14 08:00:00
</pre>
and apply with:
# exiftool -@ meta.args -overwrite_original pdfbestand.pdf
=workflow=
<pre>
#!/bin/bash
set -e
echo  alle odg naar pdf zetten
libreoffice --headless --convert-to pdf *.odg
echo alle pdf files in 1 groot document
pdfunite {1..22}.pdf samengevoegd.pdf
echo pdftk om fouten weg te krijgen
pdftk samengevoegd.pdf output rc1.pdf
echo de metadata erin
exiftool -@ metadata.csv rc1.pdf
echo haal oude metadata weg en houd alleen de laatste huidige
qpdf --linearize rc1.pdf rc2.pdf
echo
echo De file rc.2 is de output
echo
</pre>

Latest revision as of 07:58, 14 August 2025

View PDF metadata:

# exiftool file.pdf

View specific metadata:

# exiftool -Creator file.pdf
# find . -type f -iname '*.pdf' -exec exiftool -Creator {} \;

Set metadata:

# exiftool -Creator='barbapappa' file.pdf
# find . -type f -iname '*.pdf' -exec exiftool -Creator='barbapappa' {} \;

to preserve date/time:

-P

to delete backup file that is created:

-delete_original[!]
# find . -type f -iname '*.pdf' -exec exiftool -P -overwrite_original -Producer='www.bladiebla.nl' -Creator='barbapappa' {} \;
# find . -type f -iname '*.pdf' -exec exiftool -P -delete_original! {} \;

Edit in one metadatafile

Make a parameter file

-Title=Mijn Titel
-Author=Mijn Naam
-Creator=Microsoft Word
-Producer=Adobe PDF Library 15.0
-Subject=Korte samenvatting
-Keywords=tag1, tag2, tag3
-CreateDate=2025:08:14 08:00:00
-ModifyDate=2025:08:14 08:00:00

and apply with:

# exiftool -@ meta.args -overwrite_original pdfbestand.pdf

workflow

#!/bin/bash
set -e

echo  alle odg naar pdf zetten
libreoffice --headless --convert-to pdf *.odg

echo alle pdf files in 1 groot document
pdfunite {1..22}.pdf samengevoegd.pdf

echo pdftk om fouten weg te krijgen
pdftk samengevoegd.pdf output rc1.pdf

echo de metadata erin
exiftool -@ metadata.csv rc1.pdf

echo haal oude metadata weg en houd alleen de laatste huidige
qpdf --linearize rc1.pdf rc2.pdf

echo
echo De file rc.2 is de output
echo