Skip to content

Instantly share code, notes, and snippets.

View mpietruschka's full-sized avatar

Marti McFly mpietruschka

  • Germany, Düsseldorf
View GitHub Profile
@Te-k
Te-k / pdf_metadata.md
Created November 26, 2020 10:31
How to remove metadata from PDFs

Many tools do not fully remove metadata, but just remove the link with in the metadata table. The data are thus still available in the PDF file itself.

While a lot of people rely on Exiftool to remove metadata, it actually does the same in PDFs. If you remove metadata with exiftool -all= some.pdf, you can always restore the data with exiftool -pdf-update:all= some.pdf.

There are several options to remove PDF metadata safely:

Option 1 : Exiftool with qpdf

  • Remove metadata with exiftool : exiftool -all= some.pdf
  • Then remove ununsed objects with qpdf : qpdf --linearize some.pdf - > some.cleaned.pdf
@pirate
pirate / docker-compose-backup.sh
Last active January 26, 2025 23:38
Backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
@bosim
bosim / fix-entryids.py
Last active June 23, 2021 18:03
Fix broken entryids in a folder
"""
Fix broken entryids in a folder
BEFORE YOU RUN THIS SCRIPT: BACKUP YOUR KOPANO DATABASE WITH mysqldump OR SIMILAR
NOW YOU HAVE BEEN WARNED. THIS SCRIPT COMES WITH NO WARRANTY WHAT SO EVER.
Step 1: BACKUP DATABASE! It is recommended you shutdown kopano-server while running
this.
Step 2: Change the USER, PASSWORD, HOST, and DB variables below
Step 3: Find the store guid and hierarchy id of the folder
<Scimmia> irreleph4nt, and how do you know, with absolute certainty, that it isn't an ARM specific issue?
<petejones> irreleph4nt: "Arch Linux ARM is a distribution of Linux for ARM computers"
<ponyrider> its about the packages
<peterpacz1> Guys, I am so excited. I am buying a Thinkpad T430s to install Arch on.
<peterpacz1> It's the first time I'm using Arch, and the anticipation is real!
* s4ndm4n (~sandman@unaffiliated/sandman13) has joined
<petejones> irreleph4nt: "We are a port of Arch Linux"
* Gnomethrower (~B@unaffiliated/gnomethrower) has joined
<eKenda> peterpacz1, Can understand that! I'm getting the same feeling for freebsd right now xD
<petejones> peterpacz1: nothing feels better than setting up a perfect arch install for the first time.
@hubgit
hubgit / README.md
Last active March 11, 2025 17:21
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files