this post was submitted on 04 Jan 2024
143 points (99.3% liked)

Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ

54669 readers
545 users here now

⚓ Dedicated to the discussion of digital piracy, including ethical problems and legal advancements.

Rules • Full Version

1. Posts must be related to the discussion of digital piracy

2. Don't request invites, trade, sell, or self-promote

3. Don't request or link to specific pirated titles, including DMs

4. Don't submit low-quality posts, be entitled, or harass others



Loot, Pillage, & Plunder

📜 c/Piracy Wiki (Community Edition):


💰 Please help cover server costs.

Ko-Fi Liberapay
Ko-fi Liberapay

founded 1 year ago
MODERATORS
 

I am officially an old person, as I have subscribed to a magazine. It’s niche, but it’s been around a long time, and having enjoyed a lot of issues in my childhood that were given to me for free, I feel I should give back.

I’m wondering if there are precautions I should take. Can any sort of copy protection be put into PDFs that I should strip out? If I share them as a torrent, should I be worried that the publisher can tell where they came from?

all 22 comments
sorted by: hot top controversial new old
[–] Axxi@lemmy.world 135 points 10 months ago* (last edited 10 months ago) (3 children)

cough, cough

Whoops! It appears as though I've unintentionally dropped a link regarding meta data removal from PDF's..

https://pdf.wondershare.com/how-to/remove-metadata-from-pdf.html

I suppose I'll just leave it there for any interested parties to do with it what they will. 😉

[–] sebinspace@lemmy.world 45 points 10 months ago (1 children)
[–] Hyperreality@kbin.social 16 points 10 months ago* (last edited 10 months ago)

What about invisible/hidden watermarks?

[–] darkstar@sh.itjust.works 8 points 10 months ago

How dare you! Guards! Arrest this man!

[–] ductjump@lemmy.world 29 points 10 months ago

Stirling PDF has a meta data removal tool included as well as a heap of other useful features. Can be self hosted.

https://github.com/Stirling-Tools/Stirling-PDF

[–] Atropos@lemmy.world 17 points 10 months ago (3 children)

I think if you print the PDF to another PDF, it'll lose any copy protection or potential identifiers.

[–] sebinspace@lemmy.world 5 points 10 months ago (3 children)

Can anyone confirm this? Would make the whole process very macroable

[–] danielquinn@lemmy.ca 16 points 10 months ago (1 children)

The easiest way to confirm this would be:

  1. Find out how to list the metadata from a PDF.
  2. List the metadata from a known-to-have-stuff-you-don't-want PDF.
  3. "Print" the new PDF from the old one
  4. List the metadata from the new PDF.
[–] Timwi@kbin.social 19 points 10 months ago (1 children)

This obviously assumes that you know exactly what metadata you want to eliminate and how to view it.

The OP’s whole point of asking is that they don't know the former.

[–] sebinspace@lemmy.world 8 points 10 months ago

This, essentially. Like until I tried to move music from iTunes to Foobar, I didn’t learn that metadata was even a thing, and apparently neither does Apple.

[–] theamigan@lemmy.dynatron.me 3 points 10 months ago

If you use ghostscript, it absolutely should, but you're probably better off using something like cpdf.

[–] exu@feditown.com 2 points 10 months ago

Buy two PDFs with different accounts and hash the result?

[–] doc@kbin.social 3 points 10 months ago

Adobe and Microsoft PDF printers retain some information. If you run it through ghostscript you'll get only the PostScript output. You can use a free utility like cutepdf to make it easy. Just install the latest gs release after installing cutepdf instead of the download they provide.

[–] glibg10b@lemmy.ml 1 points 10 months ago

I imagine this destroys hyperlinks. Maybe machine-readable text too

[–] GenderNeutralBro@lemmy.sdf.org 17 points 10 months ago* (last edited 10 months ago) (1 children)

There are some free, open-source command line tools that can do this.

First off, there's exiftool. It's the go-to utility to read and write metadata in a wide variety of file types, like mp3, jpg, and you guessed it, pdf. It's very easy to use:

To read all the metadata in a file: exiftool -a -All <file> (where is the path to your pdf).

To erase all the metadata in a file: exiftool -a -All="" <file> (that's two double-quotes, to indicate a blank string). Please note that this will overwrite your file in-place! If you want to save the output as a new file, use exiftool -a -All="" -o <output_file> <file>.

exiftool is likely all you need for your use case, but if you need more advanced PDF manipulation, with a truly dizzying array of options, there's Ghostscript. Ghostscript can read, write, and convert PDFs, and provides hooks to apply any PostScript commands and options.

To simply print out information on a PDF file: gs -dPDFINFO -dBATCH <file>. This will show you the metadata, such as author, title, etc.

I'm...not going to give you an example of how to use Ghostscript to edit metadata because I'm not confident I'd get it right. The gist is that you use PostScript commands with the -c flag. It is truly arcane but extraordinarily powerful.

If you're on Linux, you can likely get both of these with your distro's default package manager. On Mac, use Homebrew or MacPorts. On Windows, you can download prebuilt binaries from their web sites. I think you can even run them on Android using ~~Tmux~~ Termux.

[–] drivepiler@lemmy.world 9 points 10 months ago (2 children)

I believe you're referring to Termux, the terminal app. Tmux is a terminal multiplexer. Although you can run Tmux in Termux, so technically...

Anyway, great post! It seems I have to check out Ghostscript, don't think I've ever heard of it, thanks.

[–] GenderNeutralBro@lemmy.sdf.org 3 points 10 months ago

Yes, thanks! I did indeed mean Termux. I'll edit my post.

[–] refutablewife@reddthat.com 9 points 10 months ago (1 children)

Use calibre book converter. You might need a plugin if it's a super specific drm that needs to be removed (like, say, a library book from the libby app), but calibre will let you pick any output you want and save it as a clean file.

[–] Radin@lemmy.world 1 points 10 months ago (1 children)

I’ve used calibre to put ebooks on my kindle before but do you have any idea if that would work for books downloaded from kindle unlimited? It’d be great to grab a bunch on my “to read” list and not have to worry about reading them before my subscription runs out.

[–] refutablewife@reddthat.com 2 points 10 months ago

Yeah, for sure

  1. download it to kindle 2: transfer azw/mobi file to computer 3: open calibre and install DeDRM 4: drag and drop books into calibre 5: calibre is auto de-drm'ing the books so you can now convert them to any format you want or just backup the books