In my code i have to generate postscript file using a word word document and finally it converts to PDF document using the postscript file(Using Acrobat Distiller).
I have one issue here while it converts word document to postscript file it is taking time to generate postscript file. Issue is with out completing the generated of the postscript file my code moves to next statement to generated PDF file using postscript file as Input parameter. Here i want to put a check whether a postscript file generation completed and then it should move to the next statement to generated PDF.
Here is my code:-
Code to Convert Word to PostScript file
public Word.Application objWordApp = null;
public Word.Document objWordDoc = null;
object objMissing = System.Reflection.Missing.Value;
if (Convert.ToString(objWordApp.ActivePrinter) != AdobePDF)
{
SetDefaultPrinter(AdobePDF);
}
objWordDoc.PrintOut(ref objMissing, ref objMissing, ref objMissing, objWordOutputPath, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing);
Code Which converts Postscript file to PDF
private PdfDistiller objPDFMaker;
public void ConvertToPDF(string psfile, string outputName)
{
objPDFMaker.FileToPDF(psfile, outputName, "");
}