I try to convert a docx-file to pdf by using the following simple Code:
ConversionJobSettings jobSettings = new ConversionJobSettings();
jobSettings.OutputFormat = SaveFormat.PDF;
ConversionJob job = new ConversionJob("Word Automation Services", jobSettings);
job.AddFile(path + docFilename, path + pdfFilename);
job.Start();
But when I try to run the code I get an exception:
A Word Automation Services application proxy with name 'Word Automation Services' cannot be found
In the service applications, both
Word Automation Services
and
Word Automation Services Proxy
are started.
I use Microsoft.Word.Office.Server (from C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI)
(UPDATE:) It does seem to work when I add my own proxy and use that name, but that should not be necessary, right?
I used the following snippet:
Seems like my proxy is not called "Word Automation Services", but "Word Automation Services Application"
Like that approach even more, no "magic strings"