Recently we found Paul Madary's blog post about digital signatures in a Univeral Application (UWP) with iText 7, and we wanted to share it. Paul gracefully agreed to let us do that, and as a bonus we upgraded the code to be usable out-of-the-box with iText 7.1.3. The only change needed is the method SignDocumentSignature.

A big thank you to our Q3 top contributors!

There are so many people that contribute information to us in order to help improve our code, products and projects. We want to make sure that our top contributors are being recognized for the help they give and that they know how much we appreciate them.

PDF is a Page Description Language. Every page is an autonomous set of objects. The content is stored in one or more streams. There is no such thing as a paragraph or a table etc in a PDF. It's just a sequence of lines, shapes and glyphs drawn on a page.

When you add content to a document using the Add() method, this content is converted into PDF syntax that is appended to the content stream of a page. As soon as the page is full, this content stream and the corresponding page dictionary are written to the output stream and flushed.

Not sooner!

Several objects, such as fonts, the cross-reference table, Form XObjects,... are kept into memory, because they can change during the document creation process.

Take a note, that in iText 7 Document class has a constructor with immediateFlush parameter: Document(PdfDocument pdfDoc, PageSize pageSize, boolean immediateFlush). This parameter is true by default. If you don’t want to write pages and page-related instructions to the PdfDocument as soon as possible, set the immediateFlush to false and call doc.flush() when it is necessary.

Click this link if you want to see how to answer this question in iText 5.

Popular tags

Related content

Unit Testing and Automated Testing Questions

admin-marketing

I have been searching for some unit tests for the program iText with no luck. Is anyone aware of any such tests? Also, does anyone know if the developers use any automatic testing tools on iText, such as Jenkins?

When is the content flushed to a PDF File by iTextSharp?

Ready to use iText?

As always, if you have any technical questions, you can contact support with your valid support subscription or head over to one of our community support pages on Stack Overflow to see if your question has already been answered for our AGPL users.