I am trying to print a Word Document (either created dynamically or loaded from existing file) to a Print File. See my code below. It succeeds but I get 2 empty pages in the output file. I manually printed to a file using same print driver, etc. and it works fine. I verified the word doc file exists. Please advise if this feature works in the latest version (5.3) or not. I am using the trial version (we have a license but won’t work on this version). If it is supported, then what am I doing wrong?
DocumentRenderer dr = new DocumentRenderer(DOC_FILE_NAME);
dr.PrinterSettings.PrinterName = DEFAULT_PRINTER;
dr.PrinterSettings.PrintToFile = true;
dr.PrinterSettings.PrintFileName = PRINT_FILE_NAME;
dr.Print();
Hi
Thanks for your inquiry. Could you please attach your document for testing? Also note that Aspose.Words.Viewer namespace is currently in beta and limited technical support is provided for it.
Best regards.
Could the issue be that I am using the eval version? If I had the proper license, maybe it would work. Just wondering if that could be the issue.
What are your thoughts on this?
Thanks.
WE use SwiftView to view PCL and PRN files. Have been using it for years now. Should not be a problem there.
Could you attached the prn file you produced so I can see if the SwiftView works on it?
Thanks.
It is working fine now. After you waved your magic wand, no problems. I did not changed anything and it is working, same code I sent you.
Appreciate your help and timely follow up. Excellant work.
Thanks.
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.