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

Free Support Forum - aspose.com

Printing MSWord docs in Page Layout format

We recently purchased Aspose.Word 5.1 and used it successfully in one of our projects to produce and save Word docs to disk. We found however that we cannot produce and print a Word document in “Page Layout” format. It appears that “Normal” works, but our documents will not print properly that way. I see that version 5.2 is available. We need to make a decision about products to use to get our documents printed so need to know if the Word print enhancements are in version 5.2 and if not, when will the version that includes the Word formatting enhancements will be available.
Thanks for your help

Thanks for your inquiry. Aspose.Words document represents content and formatting of a document, not its layout into lines and pages. Word document is rendered to pages by MS Word.
Could you please attach your document for reviewing? And please describe what exact problems you have.
Best regards.

I hope I am not posting incorrectly, but I believe my problem fits in this thread.
If I export to Rich Text Formatting, the document actually seems to come up fine and even prints fine. If I export to DOC (MS Word) then the document is not viewable in “Print Layout” and should you try to print it, you do not get what you were expecting. Again, doing this in RTF seems to work fine at first glance.
We used to export to word using Crystal Reports and that has never been a problem. We’ve since migrated to Reporting Services and found our way here for the ability to continue exporting to Word. I’ve placed the .rdl, .doc and .rtf files within the attached zip file.
For a quick rundown, each “report” returned from the Dataset is actually two 8½ x 14 (legal) sheets of paper which ends up printing on both sides of one special sheet of paper. RTF seems to understand this and breaks the “report” up into two pages whereas PDF and DOC seem to think it is just one page. Not sure if that has anything to do with this or not.
I found a related post here on your forums back from 2007. Perhaps there is some relation here and has anything been figured out/fixed:
Please get back with me when you can so we can figure out which route we will be taking here.



Hi Bill,
Can you please let us know how you create your document? If you create it programmatically using Aspose.Words could you please attach your source code here. Attach your document too. Zip it all into one file and attach.
We will try to reproduce and fix asap.

Dear Scott,
Thank you for your request. I have tested your files and yes, the DOC file seems to be not viewable in the print layout mode. The same happened when testing your RDL report.
We will be investigating the cause of the issue in the next few days and let you know the result immediately after figuring something out.

The height of the report’s page is 25.75 inches. It is more than Word allows. I’m not sure why the RTF format works (maybe Word has some internal limitations when reading RTF) but in general the height of the page is larger than Word can accept.
At the moment I have two suggestions:

  1. Can you reduce the height of the page?
  2. Is using the DOC format a requirement? Can you use RTF since it works to you?

Thank you for reviewing this.
I set the height to that setting since I needed both “pages” on one report so I thought by setting the height to what the two pages would come out to then I would be good. That was a mistake and thanks for researching it. After a lot of searching on the internet to try and figure out how to get the report page/body/list settings, etc set correctly, I ended up finding out I was to only set the page height to the actual size of a single sheet of paper that this was to print on…which was 14 inches. The actual report and list were ok to be larger since the only values Word was concerned about was the “page” settings. So, I set those to 14 inches like I said and exported to Word and PDF (I was able to pull these up in PDF previously but couldn’t understand why PDF assumed it was all one page instead of breaking it up into two pages). Both Word and PDF displayed everything correctly. Thanks again for the help. I’m not sure if the page height issue I was having is the fix for all of these situations. Others might want to double check the PageSize settings on the “report” properties.
Thanks again for your help!

Thanks Roman;
Here are the documents you requested. we included 2 .tif files so you could see how the docs should look when printed. I see there are lots of other comments regarding this so I will read thru them.

Thank you for additional information. As I see from your code you are using Aspose.Words.Viewer to print your documents. Unfortunately Aspose.Words.Viewer namespace is currently in beta and limited technical support is provided for it. Please see FAQ for more information.
Best regards.

Thanks Scott. Please feel free to question me again whenever you need.

We are happy to tell you that the new Rendering Engine has replaced the “old Viewer Beta”. The Rendering Engine can print, save as images or draw onto .NET Graphics object any document page.

Please see Aspose.Words documentation to learn more about new features.

Saving to image

In additional, new Rendering engine allows you to convert Word document to PDF directly (without using Aspose.Pdf).

Saving to Pdf

The latest version of Aspose.Words is available for download from downloads section or from NuGet