Free Support Forum - aspose.com

Duplicate text when printing

We have an issue with duplicate information being inserted when printing a document created using aspose.word...the document has bookmarks that we use to drop data in from a database. All the data comes in fine, but when you click the print button on the Word toolbar one of the bookmarks duplicates the data that was there so you get something that looks like this:

Before printing.....Invoice #: 10

After clicking print.....Invoice #: 1010

Any thoughts???

Thanks,

Frank

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

Thanks for your request. Could you please attach your documents (input document and output) and provide me code that will allow me to reproduce this issue? I will investigate this problem and try to help you.

Best regards.

Alexey...thanks again for your quick response. I'm attaching a text file which has the code as we've implemented it and I'm also attaching the original Word template and the output Word file created from the template for your review.

Thanks...Frank

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

Thank you for additional information. This occurs because your template contains field {Invoice_Number} (press Alt+F9 to see it). During printing MS Word updates all fields in the document so you get duplicated text. I think that you should remove this field from your template. Try using the attached template instead yours.

Best regards.