There is a template PDF - a document representing a form to fill out. The fields to be filled are long rows of squares. One or another symbol fits into each square. You need to somehow fill in this form automatically. Are there any libraries (preferably .net) that allow to do this? That is, it is not just the insertion of text into a PDF document that is of interest, but the insertion of each character into a separate placeholder, which is somewhat more difficult.

    2 answers 2

    I use for this purpose the iTextSharp library. It has all the necessary tools to fill out a template PDF document.

    • Thank you very much, but I have already solved the problem with the help of this library - DreamChild

    It seems to me that it is easier to create your own "alphabet" here. That is, a set of pictures, where there is an image of each character in this box. And "print" to the file with a set of these pictures. Well this option will help if further editing of this form is not required.

    • Perhaps this makes sense, but then visible borders may appear at the junction of the image and the document. The fact is that the document should be redirected to one important and very bureaucratic state organization, in which it may not be accepted in this case - DreamChild
    • Well, to make the background of this picture exactly in the background of the document and make them so that they can be printed without indents (close to each other). Well, then make the document read-only - that is, turn it completely into a picture. And no one will ever understand how it was created: D Well, or just for perverts - so after such a print, go through it with the reader and it is ready))))) - VorobyevEvgeniy
    • the reader is unlikely to go - the generation of such documents should be almost on an industrial scale, about a dozen at a time - DreamChild
    • Then, if the option with pictures does not fit, I think you need to drip into the root of this document. Maybe there each such "input field" has some kind of ID or something like that. If these elements are not numbered, and in general they are unaddressed, then I'm afraid nothing will come of it. As an option, you can try instead of pictures, as I suggested, to create your own font with more indents and where each letter will be in its own ... well, then you already understood ;-) - VorobyevEvgeniy