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

Free Support Forum - aspose.com

Doc to Print Issues

Hi

Sorry for the dumb question, but there is something I am missing here.

I have created a document in memory. This doc contains headers and footers, plus a table with heading and many rows spreading across many pages. The header is repeated on each page.

Having created all this dynamically, when I save it to RTF (it has to be this format), it looks great when I view it in Word.

However, if I print the document directly it only prints the page and the whole table is missing.

Furthermore, if, in code, I load the saved RTF version and print it, the formatting of the table is messed up (no longer spread properly across the page).

Ultimately, we don't want to save the doc, this was just an interim step while developing to save paper - we just want to construct and print (in this scenario).

What am I missing here ? Do I have to fix or render a document prior to printing ? Do I have to do something to the table so that it is printed ? Is there some part of the doc generating cycle I have to complete to make it all work ?

Any help much appreciated - I'm so close to a working solution !

Regards

Andrew

Hi Andrew,


Thanks for your inquiry.
AndrewPM:
I have created a document in memory. This doc contains headers and footers, plus a table with heading and many rows spreading across many pages. The header is repeated on each page.
Perhaps, you are using an older version of Aspose.Words; as with Aspose.Words v13.5.0, I am unable to reproduce this problem on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v13.5.0and let us know how it goes on your side. I hope, this will help. If the problem still remains, please share your code here for testing. I will investigate the issue on my side and provide you more information.
AndrewPM:
Furthermore, if, in code, I load the saved RTF version and print it, the formatting of the table is messed up (no longer spread properly across the page).
Could you please attach your input RTF document along with code here for testing? I will investigate the issue on my side and provide you more information.

Hi

Thank you for your response.

Part 1: I have subsequently solved the issues by switching things around the other way - i.e. formatting as per the printed output. When viewed susequently in Word, the formatting is preserved and looks ok on the screen as well. I'm guessing that Word is adding an extra degree of re-formatting on top of what I was providing. I am concerned however that if it is now printed on another printer, the results will be messed up again.

Part 2: There is no input RTF, it is created in memory. Having used to work-around above, the problem no longer exists.

Overall I think I was thrown by on-the-fly re-formatting by Word.

What would be really helpful in the documentation would be an overview of the correct approach to creating and checking these documents. I'm not talking at code level, but more the right approach to creating them so that they are output consistently in print and in various viewing applications. This would have saved a lot of time which I spent making it look correct on screen only to find it was badly formatted when printed out.

Hi Andrew,


Thanks for sharing the detail. Please note that Aspose.Words tries to mimic the same behaviour as MS Word do. It would be great if you please share the following details for investigation purposes.

What environment are you running on?

  • OS (Windows Version or Linux Version)
  • Architecture (32 / 64 bit)
  • .NET Framework version
  • Provide information about your specific culture, such as the name of the culture, language and country/region.
  • Please supply us with the code from your application that is causing the issue
  • Please share the scan copy of badly formatting text
  • Please save the document into Pdf format and share it here for our reference.

As soon as you get these pieces of information to us we’ll start our investigation into your issue.