I was wondering how to view and edit the code of a pdf file?
- By viewing, I don't want to see the binary format, so I think hexdump may not be what I want. I tried gedit, but no encoding method can be used to decode the pdf content.
- By editing, I would like to search for
/Fitand change them to/XYZby for example sed. But my commandsed s/\/Fit/\/XYZ/ < 1.pdf > 2.pdfseem not change the appearance of my pdf as I expected, although it doesn't report any error. I was wondering if sed can actually work on pdf files as if they were plain text?
The context of my questions can be found from this question. My OS is Ubuntu 10.10.