note how to erase pdf metadata

This commit is contained in:
2024-08-13 18:58:50 +02:00
parent b5123a0d01
commit 31f12e2161
2 changed files with 27 additions and 0 deletions

40
data/exiftool.md Normal file
View File

@@ -0,0 +1,40 @@
---
title: "exiftool"
tags: [ "Documentation", "Metadata" ]
---
Find metadata.
```bash
exiftool image.jpg
```
Find info on all images in current directory.
```bash
exiftool -ext .png .
```
You can make this recurring with the -r switch.
And overwrite all metadata:
```bash
exiftool -all= -overwrite_original -ext jpg .
```
(NB: This does not work on pdf data. See [here](pdf_erasure.md) for erasing all pdf data)
Or just GPS data:
```bash
exiftool -gps:all= *.jpg
```
You can also use the imagemagick tool:
```bash
identify -verbose
```

25
data/pdf_erasure.md Normal file
View File

@@ -0,0 +1,25 @@
---
title: "PDF Metadata Erasure"
tags: [ "Documentation", "Metadata", "Ghost Script" ]
---
Make a text file called 'pdfmark.txt'.
```text
[ /Title ()
/Author ()
/Subject ()
/Creator ()
/ModDate ()
/Producer ()
/Keywords ()
/CreationDate ()
/DOCINFO pdfmark
```
Then run:
```bash
gs -o output.pdf -sDEVICE=pdfwrite "$FILE".pdf pdfmark.txt
```