itext-dotnet icon indicating copy to clipboard operation
itext-dotnet copied to clipboard

Fix sanity check when null Field got no parent

Open gale93 opened this issue 3 years ago • 1 comments
trafficstars

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.

gale93 avatar Feb 18 '22 10:02 gale93

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.

yulian-gaponenko avatar May 25 '22 20:05 yulian-gaponenko