Error loading PDF (Cannot read properties of undefined (reading 'formFieldCollections'))

Hi,

I'm trying the PDF Viewer to see if it suits the needs of our company and trying various PDFs, I have encountered with this error that pops up when loading certain PDFs, an example is (this BOE) and I've noted it also pops up when loading signed PDFs. Does the PDF Viewer support visualization of signed PDFs?

The error is the following (copied directly from the console):

spinner.js:55
Uncaught TypeError: Cannot read properties of undefined (reading 'formFieldCollections')
    at s.saveFormfieldsData (spinner.js:55)
    at s.requestSuccess (spinner.js:55)
    at e.pdfViewer.serverActionSettings.loadRequestHandler.onSuccess (spinner.js:55)
    at e.successHandler (spinner.js:55)
    at e.stateChange (spinner.js:55)
    at XMLHttpRequest.httpRequest.onreadystatechange (spinner.js:55)


The TS code is the following:

import { Toolbar, Magnification, Navigation, LinkAnnotation, ThumbnailView, BookmarkView, TextSelection, TextSearch, Print, Annotation } from '@syncfusion/ej2-pdfviewer';

PdfViewer.Inject(Toolbar, Magnification, Navigation, LinkAnnotation, ThumbnailView, BookmarkView, TextSelection, TextSearch, Print, Annotation);
let pdfviewer: PdfViewer = new PdfViewer();
pdfviewer.serviceUrl = "http://localhost:5000/api/PdfViewer";
pdfviewer.documentPath = "C://route/to/BOE-A-2021-17910.pdf";


The problem is that I do not know if the error raises because of a JS error or because the PDF webservice returns the data with an incorrect form.

The webservice I am using is the attached file, which I downloaded from a reponse I found in this forum.

According to npm the version of @syncfusion and @syncfusion/ej2-pdfviewer is 19.3.46 and the original source code for the test application is the ej2-quickstart from GitHub.


Attachment: MvcWebService587924662_33babaa9.zip

4 Replies

SM Sergi Magret November 11, 2021 10:41 AM UTC

Update, 

I have tried changing the WebService from the previous one to this one and still has the same behaviour.



DM Dhivyabharathi Mohan Syncfusion Team November 11, 2021 11:53 AM UTC

Hi Sergi, 
 
Thank you for contacting Syncfusion support. 
 
We have checked the provided PDF document. But were unable to replicate the reported issue with the provided document and it is loading properly. We have shared the javascript sample in which we tried to replicate this issue. 
 
 
 
 
 
Could you please try the sample and let us know whether you are facing the same issue with the provided sample? Syncfusion PDF Viewer is Client-Server oriented. So, we suggest you use the same version in both the Client and Server side. If the issue is not resolved, kindly share the modified Javascript sample in which you are facing this issue. It will be helpful for us to investigate further and assist you better. 
 
 
Regards, 
Dhivya. 
 



MM Mokbul Miah July 1, 2022 10:27 AM UTC

Hello, we have the exact same issue. Was there a resolution for this? 



AC ArunKumar Chandrakesan Syncfusion Team July 5, 2022 01:08 PM UTC

Hi Mokbul,


We are glad to announce that our Essential Studio 2022 Volume 2 Main Release V20.2.0.36 is rolled out and is available for download under the following link.


We have fixed the reported issue and it was included in our volume 2 release V20.2.0.36. Kindly upgrade to that version.



https://www.syncfusion.com/forums/175975/essential-studio-2022-volume-2-main-release-v20-2-0-36-is-available-for-download


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.


Regards,

Arun Kumar


Loader.
Up arrow icon