Ok, the cause is that there are multiple errors in the page content streams of the file. Luke’s “preflight fix to embed the fonts” not only embedded the fonts but also fixed the errors (actually somewhat overeagerly).
In detail:
The main error: The text showing instructions were not executed inside a text object but at content stream level.
In blank.pdf there is
/HelvCBB~1773914601 9 Tf
0 0 0 rg
q
0 1 -1 0 15 5 cm
(Test! - 19.03.2026) Tj
Q
As you see, no BT / ET envelops the text object. If you put the text showing instruction into a text object like this:
/HelvCBB~1773914601 9 Tf
0 0 0 rg
q
0 1 -1 0 15 5 cm
BT
(Test! - 19.03.2026) Tj
ET
Q
the text appears on the page!
I assume the OP simply forgot to use PDF::API2 calls that would have started and finished a text object like this.
Another error: Before drawing the text an attempt was made to draw a white rectangle (to get a white background for the added text, I assume). In blank.pdf this is done like this:
0 0 73.044 8.325 re
1 1 1 rg
q
0 1 -1 0 15 5 cm
f
QThe error here: after defining a path (as done here in the first instruction) it must immediately be drawn (e.g. filled using the f instruction). At most clipping operators may be added in-between. But in particular neither a color can be set (like here in 1 1 1 rg) nor the graphics state can be saved (q) nor the transformation matrix can be changed (0 1 -1 0 15 5 cm).
This instruction sequence can be fixed to something like this:
q
1 1 1 rg
0 1 -1 0 15 5 cm
0 0 73.044 8.325 re
f
QI assume the OP did not know that there are certain rules to the order of instructions used on a page content and used PDF::API2 calls in the wrong order.
Sign up
Already have an account? Login
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inSign in to Adobe Community
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.
