Frequently Asked Question:
Do you have problems with missing text, images and shapes or inverted and backwards text?
Do you have problems with missing text, images and shapes or inverted and backwards text?
Sometimes a PDF's page will have certain drawing commands that change the co-ordinate system or other graphics properties.
When new content is added to the existing content the graphics state is not what is expected and strange results can happen.
The solution is to first combine the layers into one and then "encapsulate" the layer. This adds a "save state" command to the start of the page and a "restore state" command at the end.
Once this has been done, any extra content added to the page should appear as expected.
Here's a quick example (using c#, but it works A-OK in Delphi too):
qp.LoadFromFile("Anomaly.pdf");
qp.CombineLayers();
qp.EncapsulateLayer();
qp.DrawText(100, 500, "Watermark");
qp.SaveToFile("Anomaly.pdf");