Free Support Forum - aspose.com

Word Check Box Form Field Does are not converted correctly with Aspose.PDF

I have a word template as a form that user needs to fill in. This template has check box form field do the users can check or uncheck. The problem is using Aspose.PDF to convert this document into PDF the check box form fields are converted as "T" or "F" rather than the actual box?

What should i do so i can see the box graphically in the PDF?

Olivier

Hi,

CheckBox is supported in Aspose.Pdf but is seems Aspose.Words has not support it when exporting Xml. I will move this post to Aspose.Words forum and they will reply to you.

Hi

Thanks for your inquiry. You should set SaveOptions.PdfExportFormFieldsAsText = false and CheckBox formfield will be converted as CheckBox. See the following code.

string path = @"E:\Projects\Aspos.words\Tests\TestTwo\bin\326_100961_olebigot\in.doc";

Document doc = new Document(path);

doc.SaveOptions.PdfExportFormFieldsAsText = false;

MemoryStream msWordDoc = new MemoryStream();

doc.Save(msWordDoc, Aspose.Words.SaveFormat.AsposePdf);

Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();

pdf.BindXML(msWordDoc, null);

pdf.IsImagesInXmlDeleteNeeded = true;

pdf.Save(Path.ChangeExtension(path, "pdf"));

I hope that this will help you.

Best regards.

I have now a new problem with thse. The CheckBox formfield are converted correctly, but not the Text form field. They are truncated in PDF. My user typed the text in the text form field and it seems in PDF that all the text field are truncated to same width?

Hello!

Thank you for asking this. Form fields support in Aspose.Pdf has some restrictions. Do you mean that it doesn’t allocate enough space to fit all entered text and scrolling is needed? Anyway text is not truncated. Please attach a sample document here in the forum and explain what behavior you would like to have improved. I’ll investigate this and consult with Aspose.Pdf team.

Regards,

Thanks for your quick response. I attached a print screen od the Word document and another print screen of the converted PDF. You can see that the text form field is always the same length no matter what was entered by user in Word.

Let me know what can I do make it work in PDF?

thank you,

Olivier

Thank you.

This changes need cooperation with Aspose.Pdf team. I’ll consult with them and let you know what we can suggest.

Regards,

Hi Olivier,

I think it is a bug of Aspose.Pdf. Would you please attach the doc that can reproduce this error? We will try to fix it ASAP.
Thanks.

Best regards.

I attached our template. Please let me know as soon as possible when you have an answer so we can use it.

thank you,

Olivier

Ok, I will. Thanks.

Any news on this problem?

Hi,

We are working on this issue now and hope to give you a resolution before next monday. Thanks.

Best regards.

I did not get any news on last Monday. Can you give me an update?

thank you

Olivier

Hi Olivier,

We have met some technical problem when fixing this bug. It is still not resolved yet. Hope you could understand it. We will give you an update here once we finished it. Thanks.

Best regards.

any update on this problem?

Hi,

The issue is under processing. We have made some progress on it and hope to give you a solution in about one week. Thanks for your patience.

Best regards.

It has been almost a month since your last post. Any progress?

Olivier

Dear Oliver,

I am awfully sorry that we are not able to resolve your problem in time. We have already found a solution for it. But we still have some API issues need to consult with Aspose.Words team in order to offer you a fix. I will let you know here once it is done. Thanks.

Best regards.

Hi Oliver!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

We have negotiated API changes for the intermediate XML and implemented this on Aspose.Words side. Aspose.Words hotfix will be released in few days. The remaining part should be done in Aspose.Pdf.

Thank you for understanding,

Dear Oliver,

We have resolved this problem. Please try the attachment before our next hotfix. To get right result, please use this dll with Aspose.Words 5.0.2 or later. We appreciate your patience. If you have any other problem, please let us know. Thanks.

Best regards.