Hi there,
We are using Aspose.Words .NET version 20.3 and the following code to convert the Word text inputs - fill in only.docx (attached here Word to PDF - fillable fields.zip (57.5 KB)) to PDF:
var doc = new Document(input);
doc.LayoutOptions.TextShaperFactory = HarfBuzzTextShaperFactory.Instance;
doc.AcceptAllRevisions();
doc.UpdateFields();
doc.UpdatePageLayout();
var saveFormat = new PdfSaveOptions
{
OptimizeOutput = true,
ImageCompression = PdfImageCompression.Jpeg,
PreserveFormFields = true,
UpdateFields = true,
SaveFormat = SaveFormat.Pdf
};
doc.Save(output, saveFormat);
Please notice the output of conversion Word text inputs - fill in only.docx.pdf and the original doc file with restrictions off Word text inputs - designer.docx that will allow poking with the docx.
The situation we are facing is as follows:
- the client is used to filling the docx file (see Word text inputs - fill in only.docx) and having this auto-expand on the fillable text field/control; this means that the input text is visible all the time
- we are trying to get the same user experience with the PDF Word text inputs - fill in only.docx.pdf but the text fields are converted to a fixed text width
We appreciate any help in achieving the same user experience in the PDF. Are there any leads on conversion configs that we could explore?
Best regards.