I am using a .doc file as a template and populating merge fields in it to generate my document.
I'm using the latest version of Aspose.Words.
What I'm trying to achieve is the auto printing of a pdf when my code is finished populating all of the merge fields.
Currently I use the line of code:
resultDoc.Save("test.pdf", Aspose.Words.SaveFormat.Pdf, Aspose.Words.SaveType.OpenInBrowser, Response);
in order to load it as a PDF in the browser.
What I want to do now instead is have the generated PDF go directly to the printer.
I've tried things like
resultDoc.Print(), but I find the browser page loads blank and just freezes and does nothing.
I've alos tried
Aspose.Words.Rendering.AsposeWordsPrintDocument abc = new Aspose.Words.Rendering.AsposeWordsPrintDocument(resultDoc);
abc.Print();
but again it just freezes.
I would have expected it to go directly to the printer, but I see nothing happening.
What am I doing wrong?
thanks.