We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Printing docx file to StreamServe Print Server

Hi,

I have a requirement to print a docx file to a ‘StreamServe print server’, which is basically a virtual print driver that generates a proprietary xml file with an lxf extension.
The process appears to work very well apart from the fact that apostrophes’ appear like this :

<span style=“font-size: 11pt; font-family: “Calibri”,“sans-serif”; color: rgb(31, 73, 125);”><o:p></o:p>

that¶s


where the label text should read, "that’s"
I have tried printing the file to an alternative print driver (http://xmlprinter.com) and have no character issues in this case.

Do you have any suggestions in terms of what I might be able to tweak in the rendering of the AsposeWordsPrintDocument that might help to resolve this issue?

Thanks!
Kimo


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

Thanks for your request. Have you tried printing this document using MS Word? Is the same result produced? Also you can try converting your document to DOC using MS Word and try printing DOC file.

Please attach also your document here for testing.

Best regards,

Hi Andrey,

I have tried converting the document to a Word 97-2003 format and that did not appear to make any difference to the way the xml file is rendered.

As requested, I have attached two sample files demonstrating the issue. You will notice that the apostrophe is replaced by a strange character. I am aware that MS Office has a tendency to translate certain characters to what they feel are more visually appealing. For example (the previous mentioned example) the single quote or apostrophe (‘) has been translated from a hex value of 0x27 to 0x93.

Many thanks for any assistance you may be able to offer.
Kimo

<span style=“font-size: 11pt; font-family: “Calibri”,“sans-serif”; color: rgb(31, 73, 125);”><span style=“font-size: 11pt; font-family: “Calibri”,“sans-serif”; color: rgb(31, 73, 125);”>

Hi

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

Thank you for additional information. I cannot reproduce the problem on my side. I use the following code for testing:

Document doc = new Document("tester_Input.docx");

PrinterSettings settings = new PrinterSettings();

settings.PrinterName = "XML Printer";

doc.Print(settings);

This is my output:

<?xml version="1.0" encoding="utf-8"?>

<printjob document="document" origin="\\Aspose\Andrey" version="3.6.0.7183" dpi="300">

<page number="1" type="ISOA4" width-mm="210" width-px="2480" height-mm="297" height-px="3508" orientation="portrait">

<text left="2096" top="3254" width="85" height="56" font-face="Calibri" font-size="11">1 / 1</text>

<text left="300" top="302" width="107" height="41" font-face="Arial" font-size="9">This is</text>

<text left="419" top="302" width="21" height="41" font-face="Arial" font-size="9">a</text>

<text left="450" top="302" width="1184" height="41" font-face="Arial" font-size="9">test document to demonstrate how apostrophes are displayed in lxf files.</text>

<text left="300" top="393" width="140" height="41" font-face="Arial" font-size="9">That’s it.</text>

</page>

</printjob>

I use the latest version of XMLPrinter 3.6.0.7183. As I can see you use 1.06.00 version.

Bets regards,