RenderPdfPages not called for PDF files including Forms in its content

Hi team,

Thanks in advance for your help. I have been having issues to render PDF files containing forms with buttons to reset the form and selection of values in dropdown lists. So far I am not able to render this type of PDF files. I was wondering if there is a way to render the content of this type of PDF files.

Currently, the Load request is stared and finished, but it is not following RenderPdfPages as it is happening for other PDF files. I am getting just the following logs:


Request starting HTTP/1.1 OPTIONS http://localhost:62870/api/pdfviewer/Load

Request finished in 3.5382ms 204

Request starting HTTP/1.1 POST http://localhost:62870/api/pdfviewer/Load application/json;charset=UTF-8 222

Route matched with {action = "Load", controller = "PdfViewer"}. Executing controller action with signature Microsoft.AspNetCore.Mvc.IActionResult Load(System.Collections.Generic.Dictionary`2[System.String,System.String]) on controller EJ2AmazonS3ASPCoreFileProvider.Controllers.PdfViewerController (EJ2AmazonS3ASPCoreFileProvider).

Executed action EJ2AmazonS3ASPCoreFileProvider.Controllers.PdfViewerController.Load (EJ2AmazonS3ASPCoreFileProvider) in 1712.0634ms

Request finished in 1722.4997ms 200 text/plain; charset=utf-8


For instance, this type of PDF cannot be rendered:

http://foersom.com/net/HowTo/data/OoPdfFormExample.pdf


How can I render this PDF file?


Thanks for your help


5 Replies

DM Dhivyabharathi Mohan Syncfusion Team March 8, 2022 07:33 AM UTC

Hi Arturo, 
 
We suspect that you have tried to load the form field document without injecting the formDesignerService and formFieldsService. So, the reported issue occurs. We suggest you inject the formFieldsService and formDesignerService to get the issue resolved. We have shared the sample and code snippets for your reference. 
 


 
Code snippets: 
  
import { PdfViewerComponent, Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView, ThumbnailView, Print, TextSelection, TextSearch, Annotation, FormFields, FormDesigner, Inject } from '@syncfusion/ej2-react-pdfviewer'; 
 
 <Inject services={[Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView, ThumbnailView, Print, TextSelection, TextSearch, Annotation, FormFields, FormDesigner]}/> 
  
  


 
Kindly try this and let us know if the issue resolves or not. If not, please share the response details in the network tab. This will be helpful to investigate further and provide the solution at the earliest.   
 
Regards, 
Dhivya. 



AR Arturo Reyes Lopez replied to Dhivyabharathi Mohan March 9, 2022 07:04 AM UTC

Hi Dhivya,


Thanks for your response :)


With the addition of FormField and FormDesigner, I got the PDF Form loaded. Mostly in good format except the checkboxes. I am not getting the ticks on them. For instance the fields Single, Married and Married but withhold at higher Single rate in the PDF file are checked, but after loading the ticks do not appear:


Using the following versions allowed me to get those ticks:

"dependencies": {
    "@syncfusion/ej2-base": "^19.1.57",
    "@syncfusion/ej2-buttons": "^19.1.54",
    "@syncfusion/ej2-data": "^19.1.56",
    "@syncfusion/ej2-dropdowns": "^19.1.57",
    "@syncfusion/ej2-grids": "^19.1.57",
    "@syncfusion/ej2-inputs": "^19.1.57",
    "@syncfusion/ej2-layouts": "^19.1.56",
    "@syncfusion/ej2-lists": "^19.1.56",
    "@syncfusion/ej2-navigations": "^19.1.57",
    "@syncfusion/ej2-notifications": "^19.1.54",
    "@syncfusion/ej2-pdfviewer": "^19.1.57",
    "@syncfusion/ej2-popups": "^19.1.57",
    "@syncfusion/ej2-react-base": "^19.1.57",
    "@syncfusion/ej2-react-filemanager": "^19.1.54",
    "@syncfusion/ej2-react-pdfviewer": "^19.4.55",
    "@syncfusion/ej2-splitbuttons": "^19.1.54",


Having this version of react:

"react": "^16.13.1",
    "react-async-script-loader": "^0.3.0",
    "react-dom": "^16.13.1",


Thanks a lot for your help


Kind Regards,

Arturo



DM Dhivyabharathi Mohan Syncfusion Team March 9, 2022 10:02 AM UTC

Hi Arturo, 
 
We have checked with the form field document and the document is loaded properly with the checked boxes. We have shared the sample in which we tried to replicate the reported issue. We suspect that the reported issue might be document-specific. 
 
 
Run the web service and then run the React sample. 
 
 
Could you please try with the provided sample and let us know whether you are facing the same issue for the particular document or for all the form documents? If the issue occurs for that particular document then kindly share the PDF document in which you have used on your end. So, it will be helpful for us to investigate further and assist you better. 
 
Regards, 
Dhivya. 



AR Arturo Reyes Lopez replied to Dhivyabharathi Mohan March 9, 2022 10:08 PM UTC

Hi Dhivya,


Sorry for the misunderstanding in the responses, yesterday the website crashed while I was editing the previous reply and did not update. I got the checkboxes with the ticks using the mentioned versions of syncfusion.


Thanks a lot for your help on this.


Have a great day


Kind Regards,

Arturo



DM Dhivyabharathi Mohan Syncfusion Team March 10, 2022 06:27 AM UTC

Hi Arturo, 
  
Thank you for your update. We are glad to know that the reported issue is resolved. Please revert to us, if you need further assistance. 
  
  
Regards, 
Dhivya. 


Loader.
Up arrow icon