Closed WilStead closed 6 years ago
Looks like the test you've added is failing?
Failed Didstopia.PDFSharp.Tests.PDFSharpTests.TextAcroForms
Error Message:
System.InvalidOperationException : Must not change font resolver after is was once used.
I think I see the issue. If the tests are run in isolation the code works, but when run concurrently the global font resolver is set multiple times, which is disallowed. I've added guards to ensure that, regardless of what order the tests get run by the test harness, the resolver is only set once.
Thanks!
I found the source of the null reference @KokomiShiina encountered and provided a workaround.
The workaround is admittedly a bit of a hack. I was unable to decipher what the expected behavior should be to avoid getting a null value in the first place, so I simply supplied the appropriate value for the missing reference, if and when it occurs. The fix seems to stand up to simple testing.
I also added a sample AcroForm PDF and a new test case to the test project.