lk/data/pdf_erasure.md

29 lines
468 B
Markdown
Raw Normal View History

2024-08-13 16:58:50 +00:00
---
title: "PDF Metadata Erasure"
2025-02-12 14:01:15 +00:00
tags: [ "Metadata", "Ghost Script", "gs", ".pdf" ]
2024-08-13 16:58:50 +00:00
---
2025-02-12 14:01:15 +00:00
You cannot erase pdf metadata with `exiftool` (it only *appends* your changes).
To delete pdf metadata, you'll need `gs`.
2024-08-13 16:58:50 +00:00
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
```