diff --git a/OfficeToPDF/Program.cs b/OfficeToPDF/Program.cs index d4ddf71..f35141a 100644 --- a/OfficeToPDF/Program.cs +++ b/OfficeToPDF/Program.cs @@ -143,6 +143,7 @@ static void Main(string[] args) options["pdf_restrict_annotation"] = false; options["pdf_restrict_accessibility_extraction"] = false; options["pdf_restrict_full_quality"] = false; + options["pdf_orientation_landscape"] = false; // We need some printers to keep office happy Dictionary installedPrinters = GetInstalledPrinters(); diff --git a/OfficeToPDF/WordConverter.cs b/OfficeToPDF/WordConverter.cs index 53abcdb..d5fe8f3 100644 --- a/OfficeToPDF/WordConverter.cs +++ b/OfficeToPDF/WordConverter.cs @@ -416,6 +416,11 @@ class WordConverter: Converter // No printer given, so export try { + if((bool)options["pdf_orientation_landscape"] == true) + { + doc.PageSetup.Orientation = WdOrientation.wdOrientLandscape; + } + doc.ExportAsFixedFormat(outputFile, WdExportFormat.wdExportFormatPDF, false, quality, WdExportRange.wdExportAllDocument, 1, 1, showMarkup, includeProps, true, bookmarks, includeTags, bitmapMissingFonts, pdfa);