Free Support Forum - aspose.com

The pound sign (?) issue when converting from word doc to pdf

Our word document gets generated from our .Net application through templates. In one of those templates whe are using the £ (little rectangle) sign. So far so good but when the doc is converted to pdf al the £ (little rectangle) signs are changed in the english currency pound sign (£)

Funny thing is that if we run this on our dev machines which are windows xp, it al works fine. The £ (little rectangle) sign is displayed correctly in our pdf. When we do exactly the same on our server which are window server SE 2003 R2 it goes wrong. Does anyone have a clue where it could go wrong?

Used versions:

Aspose.PDF : 3.6.2.0

Aspose.Word : 5.0.2.0

I've attached the word document where it goes wrong.

Hi,

I have tested this file and was not able to reproduce the error. I have attached the output that I got. Can you please also send us the intermediate xml generated as well the output that you get.

Thanks.

I Would if I know how to get the intermediate XML. How can I get that?

Please save the xml like the following:

Document doc = new Document(@“D:\test\testword\PDFNET-4291.doc”);
doc.Save(@“D:\test\testword\input.xml”,SaveFormat.AsposePdf);

xml file is attached, the pound sign is also there.

Hi,

The problem is caused becuase of the symbol being present in the xml file generated by Aspose.Words. I will move this thread to the Aspose.Words forum so that the Aspose.Words team can have a look at it.

Thanks.

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

Thank you for contacting Aspose support.

This symbol can be rendered differently dependent on the environment. This is not an issue with Aspose.Words. Even when I’m reading your post in the forum I see pound signs instead of rectangles you have pasted here.

Please see my attachment. You can use the characters with hex codes 0x0054 and 0x00A3 to simulate selected (checked) and deselected (unchecked) check boxes in your documents. Just copy them from the attached document and they will render properly on any computer.

The best approach of using check boxes in Word documents is inserting so named form fields. You can also find them in the attachment. Form filed is not just a character but an object with Boolean state. You can even control them programmatically writing macros in Word. They are also rendered in PDF as characters 0x0054 and 0x00A3 as you can ensure.

Please let me know if you have further questions or any other feedback.

Regards,

Hello!

We already using checkboxes in our Word documents, but since version 3.6.2.0 of aspose.pdf we're getting the pound-sign in our pdf-output (instead of a square-box).

I replaced the aspose.pdf-dll with version 3.6.1.0 and this version worked ok. So I think it's a bug?

I made a 'testproject' for testing your doc-file. See the attachment for the results.

I wrote the next code:

string theFilePathDOC = @"D:\CVS_WORK\Checkboxes.doc";

string theFilePathXML = @"D:\CVS_WORK\Checkboxes.XML";

string theFilePathPDF = @"D:\CVS_WORK\Checkboxes.pdf";

// Save to XML

Document theDoc = new Document(theFilePathDOC); // Inputfile: Word-doc

theDoc.Save(theFilePathXML, SaveFormat.AsposePdf); // Save as XML-file

// Save to PDF

MemoryStream theMemoryStream = new MemoryStream();

theDoc.Save(theMemoryStream, SaveFormat.AsposePdf);

Pdf pdf = new Pdf();

pdf.BindXML(theMemoryStream, null);

pdf.Save(theFilePathPDF);

-----

Funny thing is that if we run this on our dev machines which are windows xp, it al works fine. The £ (little rectangle) sign is displayed correctly in our pdf. When we do exactly the same on our server which are window server SE 2003 R2 it goes wrong.

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

Yes, it is a regression defect in Aspose.Pdf 3.6.2.0. I’m sorry for my colleagues. I have already notified Aspose.Pdf team and they are fixing it. I’ll let you know on any progress or they will post here themselves.

To export MS Word form fields as PDF form fields please specify the following before you save in Aspose.Pdf XML format:

doc.SaveOptions.PdfExportFormFieldsAsText = false;

This will give better results on Aspose.Pdf 3.6.2.0 but it this case they will be controls, not text. If you don’t want them editable you can disallow changes in the properties of each form field in MS Word.

Regards,

Hi Allianz,

I have the pound signs’ problem as PDFNET-4535 in our defect database. We will try to finish it as soon as possible.

Best regards.

Hello,

Can you tell me what the status is of this problem?

When will an update of aspose.pdf available?

Kind regards

Marcel

Dear Marcel,

Our developer is working on it now. We will give you a solution in about two weeks. Thank you very much for your patience.

Best regards.

Hi,

The bug has been fixed. Please
try the attached dll before our new hotfix. To get right result, please
make sure the font “WINGDNG 2” is installed on your machine. I have
also attached the font file. If the font is not installed, little rectangle signs will be rendered as the english currency pound sign (£). Thanks.

Best regards.