We're using LaTeX to render a PDF with a form that will be filled in by humans, using a pen, and then fed to an OpenCV application for recognition. The form consists of questions with small squares (
\fbox symbols) that people fill to answer yes or no.
The thing is, our recognition algorithm works better when we can provide to it some hint as to where are the
\fboxes located. So we arrange them in a pattern, with some fixed distance from the borders and in between. However, if we want to create more complex layouts, we need to first render the document, and then looking at the PDF figure out the margins, separations, etc.
We would like to automate this process as much as possible, so the general question is: what is the best way to "mark" some symbols in LaTeX so that I can later somehow recover their location in the rendered PDF (probably using a second tool to look inside the PDF, I guess)?