- Home
- Forum
- ASP.NET Core - EJ 2
- Converting Doc Form Field to PDF form field
Converting Doc Form Field to PDF form field
Hi,
I am trying the following example below to convert Word Document with Form Field to PDF with Form Field. But it does not seem to work. The resulting pdf document is readonly.
https://ej2.syncfusion.com/aspnetcore/DocIO/WordToPDF#/material
From the given details we have found that your requirement is to edit the form field text in the converted PDF document. To achieve your requirement, we suggest you to enable the PreserveFormFields property in Word to PDF conversion. For your reference, we have attached the sample application and it can be downloaded from the below link.
https://help.syncfusion.com/file-formats/docio/word-to-pdf?cs-save-lang=1&cs-lang=asp.net%20core
Please let us know if you have any other queries.
Hi,
Thank you for the reply. I am not able to access the Url link that you have provided with access denied,
As mentioned earlier, we have found that your requirement is to edit the form field text in the converted PDF document. To achieve your requirement, we suggest you to enable the PreserveFormFields property in Word to PDF conversion. For your reference, we have attached the sample application and it can be downloaded from the below link.
https://help.syncfusion.com/file-formats/docio/word-to-pdf?cs-save-lang=1&cs-lang=asp.net%20core#word-document-form-field-to-pdf-form-field
Please let us know if you have any other queries.
Dear Lokesh,
Thank you for granting access the the Url. When I use the template.docx that you have provide in the zip file on the demo site the converted PDF works. My sample uses document done in Word 2016 where the pdf is not converting the word form field.
Is this a known bug?
Thank you.
Thank you for your update.
We have tried to reproduce the reported form field issue using the word document created in Word 2016, but it works properly at our end. For your reference, we have attached the Word document created in Word 2016 application and it can be downloaded from the below link:
Video references : https://www.syncfusion.com/downloads/support/forum/168960/ze/Video-731013223.zip
Please find the output PDF document which generated at our end from the below link.
We suspect that the reported issue might be due to some other problem in your environment-specific. So, could you please share with us your machine culture information, OS and Microsoft word 2016 build version used at your end currently.
This will be more helpful to reproduce the same issue at our end. Thereby, we will proceed further on the reported issue and provide you the appropriate solution at the earliest.
Please let us know if you have any other queries.
Regards
Dear Lokesh,
Thank you for the example. It looks like the form fields in your example is using the Legacy Forms Field. I tried adding form field as shown below, it will be converted to Text in the PDF.
Windows 10 21H1 Build 19043.1165
Word Version 2108 Build 14326.20404
Windows 10 Culture
| CID | Name | DisplayName |
| 1033 | en-US | English (United States) |
Thank you for your update.
From the given details, you have added the content control in the input Word document, but the content controls are not preserved as like form field in the output PDF document even in Microsoft Word itself also. Only the Text form field, Checkbox form field, and Drop-down form field (Legacy Forms Field) are preserved as PDF form fields in the converted PDF document when enabling the PreserveFormFields as true in Word to PDF conversion.
UG documentation link: https://help.syncfusion.com/file-formats/docio/word-to-pdf#word-document-form-field-to-pdf-form-field
Please let us know if you have any other queries.
Regards
Lokesh B
Dear Lokesh,
Are the content controls going to be supported in the future? Thank you.
Thank you for your update.
We have already provided content control support in Word to PDF conversion using DocIO. The content control is not preserving as like editable form fields in the PDF document. It will preserve only as text in the PDF document. If your requirement is to preserve form field as editable in the generated output pdf document means, then you need to use Text form field, Checkbox form field, and Drop-down form field (Legacy Forms Field) in the word document and then convert to PDF.
Please let us know if you have any other queries.
Regards
Lokesh B
Dear Lokesh,
Thank you for your clarifcation. I hope that syncfusion an update the documentation to reflect that. Thank you again.
Thank you for your update.
We will add those details in our documentation.
Please let us know if you have any other questions and we will be happy to assist you as always.
Regards,
Lokesh B
I actually ran into the same issue some 3 years later.
Looking at the documentation here:
https://help.syncfusion.com/file-formats/docio/word-to-pdf
there doesn't seem to be the clarification about the controls you need to use...
And then I wondered why synchfusion is so far behind? Like why doesn't the more modern Plain text content control map to the same pdf textbox control? It would make total sense and save on endless errors when users forget and use the wrong controls. Telling Devs is one thing, but we all know end users are going to make this mistake endlessly
Hi Matthew,
We are currently analyzing the feasibility to preserve content control as
editable one after converting a Word document to PDF. We will provide you with
more details on 29th May 2024.
Regards,
Sneha.
Matthew, we have analyzed the feasibility to provide support
to preserve content control as editable form fields during Word to PDF
conversion. We have logged this as a feature request, and we don’t have any
immediate plans to implement this feature.
The status of this feature can be tracked using the following feedback
link:
Provide
support to preserve content control as editable form fields during Word to PDF
conversion in WinForms | Feedback Portal (syncfusion.com)
- 14 Replies
- 4 Participants
-
AK Albert K
- Sep 18, 2021 07:40 AM UTC
- May 30, 2024 03:41 PM UTC