Profile picture
👼Ąż杏 @angealbertini
, 8 tweets, 3 min read Read on Twitter
generic advice to make PDF manipulations by hand (fill forms, modify contents...):
1 run `qpdf -qdf` to normalize the PDF [optionally with --stream-data=uncompress].
2 do your changes.
3 clean up the PDF with `mutool clean`.
remember that some fields like author can be stored as Unicode:
so 'ange' = 00 61 00 6E 00 67 00 65
inline kerning is often used (by LaTeX, etc...) in the pages contents:
it's an array of a short string (w/ parenthesis), a number, a short string...

so 'ange' can be stored like:
[(an) 3.0 (ge)]
if you want to modify graphical elements (watermarks...), don't miss @GEndignoux ' cheat sheet of PDF operators:
github.com/gendx/pdf-chea…
@GEndignoux Some viewers (evince, sumatra) display the changes on the fly, which is very neat to poke around.
It saves a lot of time when experimenting.
Mutool should get you a compatible PDF in the end anyway.
@GEndignoux PDFs - especially after `qpdf -qdf` - may look ASCII, but they are fully binary, so don't use text editors that remove non-ASCII or modifies whitespace.
You can turn a PDF to pure ASCII with "ascii hex encoding" via `mutool clean -a`
=> thgs like \xff\xd8 will be encoded FFD8.
If you want to learn the syntax and logic by yourself:
speakerdeck.com/ange/lets-writ…
and if you're curious about removing watermarks or checking for potential leaks:
speakerdeck.com/ange/an-overvi…
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to 👼Ąż杏
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member and get exclusive features!

Premium member ($30.00/year)

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!