1
При сохранении документа в формате pdf в MS Word 2010 мы получаем другие варианты, такие как «оптимизировать для». Эти параметры не могут быть установлены в качестве параметров функции Document.Saveas в C#. Расскажите, как я могу установить эти параметры перед сохранением pdf.word automation save as pdf
Document doc = word.Documents.Open(ref filename, ref oFalse, ref oTrue, ref oFalse, "?#[email protected]$", "?#[email protected]$", 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);