In Word to PDF conversions, I’m encountering issues where certain form fields are hidden, mainly dropdowns. I tried using “PreserveFormFields,” but it’s not what I need. I need the dropdowns to be converted to boxes when saved as PDF.
These are the options I’m applying:
PdfSaveOptions pdfOptions = new PdfSaveOptions {
SaveFormat = SaveFormat.Pdf, // Output format PDF
Compliance = PdfCompliance.Pdf20, // PDF 2.0 compliance
ImageCompression = PdfImageCompression.Auto, // Automatic image compression
PreserveFormFields = GetConfs.GetPreserveFormFields, // Preserve form fields
MemoryOptimization = GetConfs.GetWordMemoryOptimization, // Memory optimization
UpdateFields = true // Update fields
};
@aqueralt
When converting Word documents to PDF using Aspose.Words, if you are encountering issues with hidden dropdown form fields and want them to be converted to boxes instead, you may need to adjust your approach.
While you have already set the PreserveFormFields
property to true in your PdfSaveOptions
, this setting is primarily for retaining the form fields in the PDF. Unfortunately, it does not automatically convert hidden dropdowns into visible boxes.
To achieve the desired outcome, you might consider the following steps:
-
Modify the Word Document: Before conversion, ensure that the dropdown fields are not hidden in the Word document. You can manually change their visibility or replace them with text boxes if necessary.
-
Use Alternative Properties: Explore other properties in PdfSaveOptions
that might influence how form fields are rendered. While PreserveFormFields
is essential, there may be additional settings that can help with the visibility of form elements.
-
Post-Processing: After converting the document, you could use additional libraries or tools to modify the resulting PDF to replace dropdowns with boxes if they remain hidden.
For more detailed guidance, you can refer to the documentation on rendering options when converting to PDF, which provides insights into various settings that can be adjusted during the conversion process. Here are some useful links:
If you continue to face challenges, consider reaching out for further assistance or checking community forums for similar issues.
Sources:
[1]: Convert MS Word form to PDF fillable form
Please confirm that you are using the Cloud API version.