probleme with pdfProcessing with pdf generate by Nuance

3 Answers 137 Views
PdfProcessing
Eric
Top achievements
Rank 1
Iron
Eric asked on 11 Feb 2022, 02:32 PM | edited on 11 Feb 2022, 02:46 PM

Hello,

many problemes with this code :

 PdfFormatProvider provider = new PdfFormatProvider();
            RadFixedDocument document = provider.Import(File.ReadAllBytes(InputFileWithInteractiveForms6));

 

with pdf exemple of telerik (InteractiveForms.pdf) it is ok.

with pdf issues of Excel or Word on my pc (save as .pdf) it is ok.

 

but with pdf issues of Nuance Software.

sometime, i have this error : Object reference not set to an instance of an object

sometime : Unable to cast object of type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.PdfResource' to type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfDictionary

 

the properties of my file are :

 

can you help me ?

thank you

eric

 


 

Eric
Top achievements
Rank 1
Iron
commented on 11 Feb 2022, 02:44 PM

here is my document pdf
Lance | Manager Technical Support
Telerik team
commented on 11 Feb 2022, 04:49 PM

Hi Eric, you posted this in the UWP forums (Universal Windows Platform). Can you please confirm exactly what type of application this code is being run in? Did you intend to select WinForms, WPF or WinUI3?
Eric
Top achievements
Rank 1
Iron
commented on 14 Feb 2022, 07:33 AM

yes it is a winforms application, in C#

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 15 Feb 2022, 11:17 AM
Hi Eric,

Thank you for sharing the feedback and the document with us.

I tried to reproduce the described behavior with the provided document and it seems it works as expected (without any exceptions) with the current version of the PdfProcessing binaries. 

It could be an issue that is already fixed. Could I ask you to update the version with the latest and test if this behavior still exists?

I am attaching the sample project I created in order to test this behavior. Please, feel free to modify it in a way closer to your scenario.
0
Eric
Top achievements
Rank 1
Iron
answered on 15 Feb 2022, 01:20 PM

Hello Martin,

First, thank you for your fast answer !

The version i  was use is the 2019. With your version 2021, it 's ok !

I have to upgrade my version of telerik

thank you very much

Eric

 

 

 

 

Martin
Telerik team
commented on 16 Feb 2022, 07:15 AM

Hi Eric,

I am happy that upgrading solves the case.

Do not hesitate to contact us if any additional questions arise.

0
Eric
Top achievements
Rank 1
Iron
answered on 23 Feb 2022, 08:53 AM

Hello,

I still have a problem on some pdf that I can't read with this code :

string InputFileWithInteractiveForms7 = RootDirectory + "SampleData\\FICHE_DE_CONTROLE.pdf";
            PdfFormatProvider provider = new PdfFormatProvider();
            RadFixedDocument document = provider.Import(File.ReadAllBytes(InputFileWithInteractiveForms7));

I have the following error message :

it works with some pdf but others don't. I can't find why.

it's the same reaction with your test solution. I use the dll version 2021...

I attach my file. Thank you for your help.

Eric

 

Martin
Telerik team
commented on 24 Feb 2022, 08:27 AM

Hi Eric,

Thank you for sharing the document with us. This helps me to reproduce the described behavior.

It seems it is caused by an issue related to the normal appearance of the Widget annotations. I logged an item on your behalf to fix it: PdfProcessing: ArgumentNullException is thrown when importing a document containing Widget annotation with normal appearance dictionary set to null. Please, make sure to subscribe to the task so we can notify you when its status changes.

In appreciation for bringing this to our attention, I updated your Telerik points.

Eric
Top achievements
Rank 1
Iron
commented on 24 Feb 2022, 10:39 AM

Ok Martin. Thank you.

 

 

Eric
Top achievements
Rank 1
Iron
commented on 24 Feb 2022, 12:55 PM

I don't know how to subscribe to a task. can you explain how to do it?
Martin
Telerik team
commented on 24 Feb 2022, 01:40 PM

You can subscribe by clicking the Follow button.

Eric
Top achievements
Rank 1
Iron
commented on 24 Feb 2022, 02:47 PM

ok ! Thank you.

 

Eric
Top achievements
Rank 1
Iron
commented on 24 Feb 2022, 04:27 PM

Martin,

it would seem that the problem is on the checkboxes.

we have made some test pdfs (attached).

I don't know if it can help you?

Martin
Telerik team
commented on 25 Feb 2022, 06:05 AM

Thank you for the additional sample documents.

Indeed the problem is with the checkboxes.

We are currently investigating this issue.

I hope you successfully subscribed to the task so you can receive notifications about status changes.

Tags
PdfProcessing
Asked by
Eric
Top achievements
Rank 1
Iron
Answers by
Martin
Telerik team
Eric
Top achievements
Rank 1
Iron
Share this question
or