|
Rank: Advanced Member Groups: Member
Joined: 12/18/2013 Posts: 67
|
Hello. Some PDF fields throw NullReferenceException when you try to see the value of Color and/or Font properties. If you set a value to such text field (with checkbox field it works) and then try to Save the document to a file or MemoryStream, it will throw NullReferenceException exception. This bug did not exist in EO.Pdf version 17.2.43.0 and has been in every version after that including the latest version 18.1.7. This is the code to reproduce the issue:
Code: C#
// DOCUMENT 1 (NullReferenceException_1.pdf)
var pdfPath1 = @"C:\Data\Dev\TheIssue20180313\NullReferenceException_1.pdf";
var pdf1 = new EO.Pdf.PdfDocument(pdfPath1);
// if only these 2 checkbox fields are filled in, then it saves OK
pdf1.Fields["Falt_1"].Value = "1";
((PdfCheckBoxField)pdf1.Fields["Falt_78"]).Checked = true;
// if any text field below is filled in, then saving fails
pdf1.Fields["order_number"].Value = "order number";
pdf1.Fields["Falt_55"].Value = "person 2 name";
pdf1.Fields["Falt_80"].Value = "person 2 id";
pdf1.Save(@"C:\Data\Dev\TheIssue20180313\NullReferenceException_1 (filled in).pdf");
// DOCUMENT 2 (NullReferenceException_2.pdf)
var pdfPath2 = @"C:\Data\Dev\TheIssue20180313\NullReferenceException_2.pdf";
var pdf2 = new EO.Pdf.PdfDocument(pdfPath2);
// if only below text field is filled in, then it saves OK
pdf2.Fields["Namnförtydligande"].Value = "MAXIM";
// if this text field is filled in, then saving fails
pdf2.Fields["Text Field 1"].Value = "111";
pdf2.Save(@"C:\Data\Dev\TheIssue20180313\NullReferenceException_2 (filled in).pdf");
You can see that checkbox fields in the first document also throw NullReferenceException on Color/Font properties, but if only they get a value, then the document can be saved. You can also see that the second PDF file has 2 pages. And the field on the first page doesn't throw NullReferenceException on Color/Font properties and if only this field gets a value, then document can be saved. But all 3 fields from the second page throw exception and saving fails if any of them gets a value before saving. The PDF files can be downloaded from this link: the link to PDF file 1, the link to PDF file 2This image shows NullReferenceException on Color and Font properties: the link to the imageOf course if such document is sent to PdfDocument.Merge method, then this method throws an exception as well. I'll send you these files with the code to your support email in a few mins if you don't want to download the files from dropbox. Please have a look at this as soon as you can, our clients are angry at us, because they first had to wait because of the issue with Swedish characters and now after that issue seems to be fixed in the latest build I can't use it with the fix because of this issue I run into which exists since version 17.2.75. Thank you! Best regards, Maxim
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
We have looked into this issue. The root of the problem is because the font set for the input field is invalid. We will change our code to ignore such errors and provide you a new build as soon as possible.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 12/18/2013 Posts: 67
|
Hi,
Sounds good, thank you!
|
|
Rank: Advanced Member Groups: Member
Joined: 12/18/2013 Posts: 67
|
Hello!
Is there any expected time a new build with the fix for this issue and the fix for the issue from the topic "The library doesn't see the field as a field, so it's not possible to set its value" will come? Our clients keep asking us when we'll fix the issue with Swedish characters and as I wrote I can't use the latest build with that issue fixed because of these 2 things.
Best regards, Maxim
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
The new build should be available early next week.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
This is just to let you know the new build has been posted. Please take a look and let us know how it goes.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 12/18/2013 Posts: 67
|
Hi, Thank you for the update. I noticed it this morning here https://www.essentialobjects.com/ChangeLog.aspxI'm testing now, I'll let you know! Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 12/18/2013 Posts: 67
|
Hello, I've run into another issue after the update to the latest version which didn't exist in EO.Pdf version 17.2.43.0. When EO.Pdf tries to open 1 file from our files it crashes with "Object reference not set to an instance of an object" exception. I removed everything from that file, the file now has only 1 page with 1 line and it fails to open it with EO.Pdf. Why does it fail? It did work fine in the version 17.2.43.0. The link to the file is this: the link to the fileThe printscreen of the exception: the link to the printscreen with the exceptionCould you please have a look at this? Best regards, Maxim
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
We have looked into this and confirmed this to be an issue on our end. We will fix it in our next build and reply here again when the new build is posted.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
We have posted a new build that should fix this problem. You can download the new build from our download page. Please take a look and let us know how it goes.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 12/18/2013 Posts: 67
|
Hi,
Thanks! Will have a look now and will get back then!
|
|
Rank: Advanced Member Groups: Member
Joined: 12/18/2013 Posts: 67
|
Hi,
These issues are fixed, but I found another bug with Swedish characters and Adobe Acrobat Reader :/ It's insane how much time I spent on the testing in total already...
I'll update the topic about Swedish characters now.
Best regards, Maxim
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Ah. I apologize for the issues. Please try to run as many files as possible on your end so that we can fix them together instead of one by one. Hopefully this will be faster to get all the issues resolved for you.
|
|
Rank: Advanced Member Groups: Member
Joined: 12/18/2013 Posts: 67
|
It was the final test already on all files. I was already going to write you that "it's all good, thank you", but no, found another issue :) I'm writing the explanation and preparing the test file for you now.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Great. We will work on it as soon as we receive them.
|
|