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();
Thank You!