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.

Top menu

Breadcrumb

Unit Testing and Automated Testing Questions

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?

The tests that are added when new core functionality is added. You can find these where Maven expects them: each Maven project has a src directory with 2 sub directories: main and test. For instance: if you look at iText kernel, you'll find the released stuff here and the tests here. Most of these tests are built on top of our testutils and abstract test classes.

The tests that are added when we get questions on SO or when we create code samples for the books. For these we create a sample inherited from GenericTest class and annotate that with SampleTest category. You need to follow a specific pattern when writing a sample: always use SRC and DEST for source PDFs and resulting PDFs, always use a createPdf() or manipulatePdf() method, and always give the cmp file the same name as the DEST file prefixed with cmp_.

In both cases, you'll find PDF files of which the name starts with cmp_, see for instance the filling of the sandbox folder for the examples.

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

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.