- Home
- Forum
- ASP.NET Core - EJ 2
- Fill in pdf forms in server side or javascript pdfviewver ej1
Fill in pdf forms in server side or javascript pdfviewver ej1
Hi
I'm trying to fill in the fields of an already loaded pdf. I found this example but it uses the download.
I'm trying to fill in the fields of an already loaded pdf. I found this example but it uses the download.
https://www.syncfusion.com/forums/82246/best-practice-automated-populating-of-pdf-forms
I want to fill in the fields and make them visible in the pdf viewver.
It should fill in the fields at the push of a button and not during the load
how can I do?
thank you
SIGN IN To post a reply.
5 Replies
1 reply marked as answer
VS
Vasugi Sivajothi
Syncfusion Team
March 3, 2021 07:38 AM UTC
Hi Giovanni,
Greetings from Syncfusion support,
We can add the values in form fields from code behind using the updateFormFieldsValue method, please refer to the below sample and code snippet,
Code Snippet:
|
<button id="id">Add Values</button>
document.getElementById("id").addEventListener("click", function() {
var formField = viewer.retrieveFormFields();
formField[0].value = "vasugi";
viewer.updateFormFieldsValue(formField[0]);
}); |
To Update the signatures from code behind:
|
Draw:
var formField = viewer.retrieveFormFields();
formField[8]. signatureType = [SignatureType.Draw];
formField[8].value = "";
viewer.updateFormFieldsValue(formField[8]);
Type:
var formField = viewer.retrieveFormFields();
formField[8].signatureType =[SignatureType.Type];
formField[8].value = "name";
formField[8].fontName = "Symbol";
viewer.updateFormFieldsValue(formField[8]);
Image:
var formField = viewer.retrieveFormFields();
formField[8].signatureType=[SignatureType.Image];
formField[8].value = "";
viewer.updateFormFieldsValue(formField[8]);
|
Please refer to the below documentation to fill the form fields in the server side,
Documentation: https://help.syncfusion.com/file-formats/pdf/working-with-forms#filling-form-fields-in-an-existing-pdf-document
Please let us know if you have any concerns about this,
Regards,
Vasugi
GI
Giovanni
March 3, 2021 06:22 PM UTC
Excuse me but I wanted to know how to do with ej1.
Thanks
VS
Vasugi Sivajothi
Syncfusion Team
March 4, 2021 10:06 AM UTC
Hi Giovanni,
Currently, we do not have support to add the values in form fields from the code behind in EJ1. However, we will analyze further on this and update you with more details on March 8, 2021.
Regards,
Vasugi
GI
Giovanni
March 4, 2021 03:48 PM UTC
Thank you so much you are fantastic!
VS
Vasugi Sivajothi
Syncfusion Team
March 9, 2021 08:47 AM UTC
Hi Giovanni,
Thanks for the update.
As we mentioned earlier, we do not have support to add the values in form fields from the code behind in EJ1. We will not have a plan to implement this feature, we will fix only the bugs in our EJ1 control. So, we request you to upgrade the EJ2 component to add the values in form fields from the code behind in the pdf viewer. Kindly refer the documentation and online demo from the below link
Documentation Link: https://ej2.syncfusion.com/javascript/documentation/pdfviewer/getting-started/
Web Service Link: https://www.syncfusion.com/kb/10346/how-to-create-pdf-viewer-web-service-application-in-asp-net-core
Please let us know if you have any concerns about this.
Regards,
Vasugi
Marked as answer
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
- Marked answer
-
GI Giovanni
- Mar 2, 2021 09:48 AM UTC
- Mar 9, 2021 08:47 AM UTC