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


14 Replies

LB Lokesh Baskar Syncfusion Team September 20, 2021 06:33 AM UTC

Hi Albert, 

Thank you for contacting Syncfusion support.

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. 
Please find the output PDF document which generated at our end from the below link:  
Please refer the UG documentation link given below.
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. 

Regards 
Lokesh B 



AK Albert K September 20, 2021 06:47 AM UTC

Hi,

Thank you for the reply.  I am not able to access the Url link that you have provided with access denied, 



LB Lokesh Baskar Syncfusion Team September 20, 2021 07:04 AM UTC

Hi Albert, 

Thank you for your update.

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. 
Please find the output PDF document which generated at our end from the below link:  
Please refer the UG documentation link given below.
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. 

Regards 
Lokesh B 



AK Albert K replied to Lokesh Baskar September 20, 2021 07:21 AM UTC

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.




LB Lokesh Baskar Syncfusion Team September 21, 2021 04:19 PM UTC

Hi Albert,  

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:
 
https://www.syncfusion.com/downloads/support/forum/168960/pd/WordToPDF_Core447254753.pdf

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  
Lokesh B  
 



AK Albert K September 22, 2021 01:39 AM UTC

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)





LB Lokesh Baskar Syncfusion Team September 22, 2021 12:03 PM UTC

Hi Albert, 

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   



AK Albert K September 23, 2021 10:18 AM UTC

Dear Lokesh,

Are the content controls going to be supported in the future?  Thank you.



LB Lokesh Baskar Syncfusion Team September 24, 2021 10:30 AM UTC

Hi Albert,  

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    



AK Albert K replied to Lokesh Baskar September 25, 2021 12:23 AM UTC

Dear Lokesh,

Thank you for your clarifcation.  I hope that syncfusion an update the documentation to reflect that.  Thank you again.



LB Lokesh Baskar Syncfusion Team September 27, 2021 10:00 AM UTC

Hi Albert,

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 






MA Matthew May 25, 2024 05:45 PM UTC

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



SB Sneha Biju Syncfusion Team May 27, 2024 12:11 PM UTC

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.



SB Sneha Biju Syncfusion Team May 30, 2024 03:41 PM UTC

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)


Loader.
Up arrow icon