Hi,
Is there an option to export the word to PDF but make it to letter format.
I see there is an option to set pagesize to Letter. Do you have option for setting it to Fit to Page before its saved to pdf.
Thank you
Document document = new Document();
document.LoadFromFile("E:\\testdoc\\doc2.docx");
Dictionary<Section , SizeF > Section_size = new Dictionary<Section , SizeF >();
foreach (Section section in document.Sections)
{
Section_size.Add(section, section.PageSetup.PageSize);
section.PageSetup.PageSize = PageSize.Letter;
}
document.SaveToFile("res.pdf");
foreach(KeyValuePair<Section, SizeF> keyValue in Section_size)
{
keyValue.Key.PageSetup.PageSize = keyValue.Value;
}