Welcome Guest Search | Active Topics | Sign In | Register

EO.PDF Form Fill Error starting with 22.1.67 Options
Nathan Smith
Posted: Thursday, February 23, 2023 10:31:52 PM
Rank: Member
Groups: Member

Joined: 7/31/2012
Posts: 10
After upgrading from 22.1.42 to the 22.1.67 the following pdf will generate an exception now.

https://www.fmcsa.dot.gov/sites/fmcsa.dot.gov/files/2022-03/Medical%20Examiner%27s%20Certificate%20Form%20MCSA-5876.pdf

Quote:
System.Exception: Target can not be null.
at EO.Internal.fkbl..ctor(fkbk dau)
at EO.Internal.fkcp.bohe(fkco djr, String djs, fkbk djt)
at EO.Internal.fjpc.iyoh()
at EO.Internal.fjpc.iyof()
at EO.Pdf.PdfField.cuvh()
at EO.Pdf.PdfField.blwy()
at EO.Internal.fjph.blwy()
at EO.Pdf.PdfDocument.nxik()
at EO.Pdf.PdfDocument.Save(Stream stream)


It's specifically the three PdfComboBoxField State Fields that cause the error.
I believe it might be related to them having Items with only Labels and null Values.

In the previous version there was also a problem when viewing the filled document in Chrome. The selected item is not visible until it the input receives focus but it displays fine in Adobe Reader.

Quote:
[TestMethod]
public void WorksBefore1()
{
PdfDocument doc = new PdfDocument(PdfFileName);
var field = doc.Fields["cmvState"] as PdfComboBoxField;
field.SelectedIndex = 1;
field.Modified();
doc.Save("../../../output1.pdf");
}

[TestMethod]
public void WorksBefore2()
{
PdfDocument doc = new PdfDocument(PdfFileName);
var field = doc.Fields["cmvState"] as PdfComboBoxField;
field.Value = "TX";
field.Modified();
doc.Save("../../../output2.pdf");
}

eo_support
Posted: Friday, February 24, 2023 11:57:37 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,086
Thanks for letting us know. We have confirmed this to be an issue in the current build. This issue will be fixed in our next build and we will reply here again as soon as the new build is available.
Nathan Smith
Posted: Friday, February 24, 2023 12:00:24 PM
Rank: Member
Groups: Member

Joined: 7/31/2012
Posts: 10
On the second part about the forms not showing the value until they receive focus this might be relevant.

It's a separate project pdfium but it's also based on chrome so there might be some similar base source.
https://stackoverflow.com/questions/66227256/when-filling-a-pdf-document-with-pdfsharp-the-filled-form-doesnt-show-the-valu

[quote]
if (acroForms.Elements.ContainsKey("/NeedAppearances"))
acroForms.Elements["/NeedAppearances"] = new PdfBoolean(true);
else
acroForms.Elements.Add("/NeedAppearances", new PdfBoolean(true));
[quote]
eo_support
Posted: Friday, February 24, 2023 1:20:35 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,086
Hi,

Yes. This is a separate but related issue and it will also be addressed in our next build.

Thanks!
Nathan Smith
Posted: Friday, February 24, 2023 4:29:33 PM
Rank: Member
Groups: Member

Joined: 7/31/2012
Posts: 10
That was fast. Thank you so much that is amazing.
eo_support
Posted: Monday, February 27, 2023 10:58:13 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,086
Hi,

You are very welcome. This is just to let you know that we have posted a new build that should resolve both issues. You can download it from our download page. Please let us know how it goes.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.