Word to PDF Issue with Acrobat Distiller

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);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top