How to save Word doc as PDF directly to Response stream

Dear Support
This is the code for sending a word document directly to the client

doc.Save(Response, "docname.doc", ContentDisposition.Inline, null);

Is it not possible to convert it to PDF and send it to the browser directly?

This fails:

doc.Save(Response, "docname.pdf", ContentDisposition.Inline, null);

Hi

Thanks for your inquiry. Could you please try specifying SaveFormat.Pdf.

PdfSaveOptions opt = new PdfSaveOptions();
opt.SaveFormat = SaveFormat.Pdf;
doc.Save(Response, "docname.pdf", ContentDisposition.Inline, opt);

If it does not help, could you please attach your input document here for testing? I will check the problem on my side and provide you more information.

Best regards,