V
Venkata
I am trying to convert word document to PDF using Acrobat Distiller. Acrobat
Distiller showing status as printing but never converts the document to PDF.
What is wrong with the below mentioned C# code. Am I passing wrong
parameters to ActiveDocument.PrintOut method?
Object printRange = WdPrintOutRange.wdPrintCurrentPage;
Object background = false;
Object append = false;
Object printFile = true;
Word.Application oWord = new Word.Application();
oWord.DisplayAlerts = WdAlertLevel.wdAlertsNone;
oWord.Visible = false;
oWord.WindowState = WdWindowState.wdWindowStateMinimize;
oWord.Documents.Open(ref wordFileName, ref missing, ref
missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing);
oWord.ActivePrinter = "Acrobat Distiller";
oWord.ActiveDocument.PrintOut(ref background, ref append,
ref printRange, ref pdfFileName, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref
missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing);
oWord.ActiveDocument.Close(ref saveChanges, ref missing, ref missing);
oWord.Quit(ref saveChanges, ref missing, ref missing);
Distiller showing status as printing but never converts the document to PDF.
What is wrong with the below mentioned C# code. Am I passing wrong
parameters to ActiveDocument.PrintOut method?
Object printRange = WdPrintOutRange.wdPrintCurrentPage;
Object background = false;
Object append = false;
Object printFile = true;
Word.Application oWord = new Word.Application();
oWord.DisplayAlerts = WdAlertLevel.wdAlertsNone;
oWord.Visible = false;
oWord.WindowState = WdWindowState.wdWindowStateMinimize;
oWord.Documents.Open(ref wordFileName, ref missing, ref
missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing);
oWord.ActivePrinter = "Acrobat Distiller";
oWord.ActiveDocument.PrintOut(ref background, ref append,
ref printRange, ref pdfFileName, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref
missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing);
oWord.ActiveDocument.Close(ref saveChanges, ref missing, ref missing);
oWord.Quit(ref saveChanges, ref missing, ref missing);