itext-dotnet
itext-dotnet copied to clipboard
Fix sanity check when null Field got no parent
Just a little sanity check that discards ( behaviour that I have seen in other PDF libraries ) the fields ( and their childs ) that are null and got null parent.
Hi @gale93 , Thank you for your contribution!
In terms of acroform fields hierarchy processing, being lenient is a good idea indeed. Specification is sometimes vague in that area and from my experience it's relatively common to see not strictly valid PDFs from form-fields structure point of view.
One important thing for us in case of invalid PDFs handling is to have a regression test with that kind of file. Do you think you could add a test with such an example file? Let me know if you need any help in order to produce one.
Also, would you mind signing the Contributor License Agreement and send back to us? The details are available at https://itextpdf.com/en/how-buy/legal/itext-contributor-license-agreement - it's required in order to merge the PR.