putting hidden marks in document

How might I use the api to put hidden markers at different points in a
document. I would later want to search for the markers and grab the
pdf content between different markers. The markers need to be
invisible so If I want to print the whole document it looks the same.

If you could some code examples would be great.


Like most of things in PDF this can be done in multiple ways depending
on your requirements.

If you need to add Printer Marks (such as Trims and Bleeds) you could
use PDF Layers (a.k.a. OCGs - Optional Content Groups).
As a starting point for example of how to create and consume OCGs
using PDFNet please take a look at PDFLayers sample project: