在MS Word 2010中将文档另存为pdf时,我们会获得其他选项,例如“optimize for”。这些选项不能设置为c#中Document.Saveas函数的参数。请告诉我如何在保存pdf之前设置这些选项。
Document doc = word.Documents.Open(ref filename, ref oFalse, ref oTrue, ref oFalse, "?#nonsense@$", "?#nonsense@$", ref oTrue, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oFalse, ref oFalse, WdDocumentDirection.wdLeftToRight, ref oTrue);
doc.Activate();
object outputFileName = wordFile.FullName.Replace(".docx", ".pdf");
object fileFormat = WdSaveFormat.wdFormatPDF;
// Save document into PDF Format
doc.SaveAs(ref outputFileName, ref fileFormat, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oFalse);