this is the first I'm working with PDFs on this level. So please be patient with my noob question. I understand the logical and physical structure of an PDF file on a basic level.
I have an PDF that contains a dummy ID that needs to be replaced. To check, if there is way to do this, I used qpdf to expand the PDF using
qpdf --qdf --object-streams=disable orig.pdf expanded.pdf
Using a hex editor I located the dummy ID in expanded.pdf and changed the value by simply swapping two digits
<001800180017> Tj => <001700170018> Tj
and saved it. Opening expanded.pdf in Acrobat didn't show the modification. The original ID 443 is still rendered, but searching for "443" doesn't find it. When searching for "334", the modified content, I get the rendered original ID 443 highlighted.
The PDF consist of text and vector graphic. When I insert additional digits (which obviously invalidates the offsets in the xref), I get an error message regarding a missing font and all digits are shown as dots but the vector graphic is still in place. This seems to indicate that the ID is not part of the graphic.
What did I miss?
EDIT 1: After mkl's comment, I did a deeper analysis of my PDF and found, that beside the obvious graphic content, all text was rendered by a series of m/l/c commands follwoed by a BT/ET section. Color for stroke and non-stroke was 0,0,0 for both in the BT/ET section.
Is this because of the used embedded non-standard font? Are PDFs with embedded fonts usually done this way? A graphics part for the visual representation and a transparent (hidden) text part just to get searching and highlighting capabilities?
Looking back I wonder what I did to get the dots when I first modified the content. I seems impossible and I can't reproduce it either.
Thanks Tom