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

My tester and I tried it and it is still not formatted correctly, so we are going to modify this template to use something else rather than the form text box.
thanks for trying,
Olivier

Hi Oliver,
Would you please attach you test doc and result pdf file and which version of Aspose.Words you used so that I can check it? Thanks.
Best regards.

Sorry for the delay. I retested everything again and it is almost working; however I need you to check the form check boxes. Here is the situation it is working perfectly running my program on my local pc when running in Visual Studio. However it is not working when running on the server in the IIS.
I attaching the PDF converted using Aspose.pdf (v. 3.6.2.1) ans Aspose.Words (v. 5.0.2.0). I tested two times; one time with this line: “doc.SaveOptions.PdfExportFormFieldsAsText = False” and another time with this line: “doc.SaveOptions.PdfExportFormFieldsAsText = True”. I tested both lines on my local pc using Visual Studio and on the server using IIS. The word document is the attachment named “Wire Check Request.doc”. Here are the result:
Line set “doc.SaveOptions.PdfExportFormFieldsAsText = True” result:
Local PC Visual Studio see attachment “Local_01-6000001 Wire Check Request[6].doc.pdf”
Server IIS see attachment: “Server_01-6000001 Wire Check Request[6].doc.pdf”
Line set "doc.SaveOptions.PdfExportFormFieldsAsText = False " result:
Local PC Visual Studio see attachment “Local_02_01-6000001 Wire Check Request[6].doc.pdf”
Server IIS see attachment: “Server_02-6000001 Wire Check Request[6].doc.pdf”
You can see that using the line “doc.SaveOptions.PdfExportFormFieldsAsText = True” on my local pc in Visual studio is working perfectly, but the check box is not working right on the IIS even though same code?
Why it is working perfectly on my local pc but not on server using PdfExportFormFieldsAsText = True?
Let me know,
Thank you,
Olivier

Hi Oliver!
Thank you for your thorough investigation. But when I’m trying to open PDF files Adobe Acrobat states they are corrupted and can not be opened. DOC file opens fine.
As I can expect from my experience, Aspose.Pdf sometimes renders check boxes in “form field as text” mode incorrectly. They appear as GB pound signs and so on. This issue was known as environment-dependent as you are describing. There is something with encoding or installed fonts. As I know Aspose.Pdf team already applied much effort to fix this.
To be absolutely sure please also attach intermediate Aspose.Pdf XML files. You can save them specifying SaveFormat.AsposePdf as you can see here:
https://docs.aspose.com/words/net/convert-a-document-to-pdf/
I’ll take a look and inform Aspose.Pdf team leader if necessary.
Best regards,

I am converting it into xml but inside of a stream as follow:
doc.Save(stream, SaveFormat.AsposePdf)
I saved in a stream becasue my code run in a DLL then returns the stream to the web page to open it.
I also have Adobe Acrobat version 8.1.1. Is this version a problem?
Olivier

Hi Oliver.
This is definitely more effective to convert via a stream. You do everything right. I mean that we need intermediate XML files to be sure what happens with check boxes. From my experience Aspose.Words outputs them correctly but Aspose.Pdf in some configurations goes wrong in rendering. They assumed the measures to fix this but maybe that’s not enough.
I already wrote that I’m unable to open any of your PDF files. Acrobat states they are corrupted. Do you see pound signs in place of some boxes or do they completely disappear?
Version of Adobe Acrobat cannot be a problem since Aspose components do everything without utilizing it.
Please send us intermediate and result files from the problematic configuration (that’s enough) and what version of Windows and IIS you are using on the server. After that I would be able to ask Aspose.Pdf for their expertise.
Best regards,

I took a print screen of the PDF and saved it as a “jpeg” files. Note the print screens are the top section of the pdf which it should be enough to show you the problems with the check boxes.
The pdf file that worked “Check Boxes rendering correctly.jpeg” is when I ran the code in my pc in Visual studio. The other print screen “Check Boxes not rendering correctly.jpeg” is when the code ran on my test server Windows server 2003 SP1 in IIS 6.0. My production server is having same problem with server Windows server 2003 SP2 in IIS 6.0.
Let me know if you need anything else?
thanks,
Olivier

Hi Oliver!
This is what I expected from check boxes. The issue should be fixed in Aspose.Pdf. I reminded Aspose.Pdf team twice yesterday and today. But they don’t answer. They will reply quicker if you post to their forum here:
https://forum.aspose.com/c/pdf/10
Sorry for the mess.
Regards,

Hi Oliver,

Sorry for the delay. I have no problem to open your attached pdf files with acrobat 8.0(Simplified Chinese). I found check boxes are shown as GB pound. This is an known issue and had been logged as PDFNET-4535. We will check it in different enviroments and give you a reply here once we have any progress. Thanks.

Best regards.

hello to everyone
I have the same problem with conversion word to pdf. The only solution I found is the installation of the MS Word on the server. Becouse the installation of MS Word solve the pdf converiosn bug (check box field) I supose that the bug is with some fonts and symbols.
kxip

Hello!
Thank your for your valuable observation. I think the same. There are some fonts unavailable when this occurs. Hope this could help Aspose.Pdf team to fix the issue.
As a workaround, there maybe enough to install only particular fonts, not the whole MS Word. Characters for check boxes are represented in “Windings 2” font. We export check boxes as characters of this font when PdfExportFormFieldsAsText is requested.
Once you have posted to this thread you will receive notifications on updates. Just ensure that you are subscribed in the forum.
Regards,

Is there a way for me to install just this font on the server? If yes can tell me how?
Olivier

i think the problem solves with the wingding2 font installation. just install the WINGDNG fonts to the server. (the font is attached)

I can not see any attachement. It is showing as: Attachment: Present (inaccessible)?

you can take this font from any PC which has or had installed MS Word from directory c:\Windows\Fonts

I copied both files WINGDNG2.TTF and WINGDNG3.TTF and paste it on server in folder “C:\WINDOWS\Fonts”. I also replaced wingding.ttf with a newer version. However the check box are still not working?
Do I have to do anything else to install the font?
Olivier

i do it with little bit different way. ftom Windows Explorer in path C:\Windows\Fonth select File->Install NEw Font and install the fonts.
before this copy the fonts somwhere in the server (e.g. c:\Temp)
kxip

I did install now the font like in your steps. I also reinstalled our software just to make sure it is all up to date, but the check boxes are still not working.
Do I need to install other font?
Olivier

check that you comment the line

//doc.SaveOptions.PdfExportFormFieldsAsText = False
private void SendToBrowserAsPdf(Document doc)
{
    string sFileNameXML = "Your Temporary XML FILE"
    doc.Save(sFileNameXML, SaveFormat.AsposePdf);
    Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
    pdf.BindXML(sFileNameXML, null);
    pdf.IsImagesInXmlDeleteNeeded = true; 
    pdf.IsTruetypeFontMapCached = true;
    pdf.TruetypeFontMapPath = WorkingFolder;
    pdf.SetUnicode();
    pdf.Save("output.pdf", Aspose.Pdf.SaveType.OpenInAcrobat, this.Response);
}

hope this help
kxip

I am getting an error about the path for the true type font in which I set the
pdf.TruetypeFontMapPath = “C:\WINDOWS\Fonts”
here is the error:
Access to the path ‘C:\WINDOWS\Fonts\Aspose.Pdf.TruetypeFontMap.xml’ is denied. The Aspose.Pdf.TruetypeFontMap.xml is used to improve the performance. You can use the TruetypeFontMapPath to specify another path for this file or set IsTruetypeFontMapCached to false to disable this function.
What is the path for this folder and where is this xml?
Olivier