diff --git a/OfficeToPDF/PowerpointConverter.cs b/OfficeToPDF/PowerpointConverter.cs index 1f78981..287de9d 100644 --- a/OfficeToPDF/PowerpointConverter.cs +++ b/OfficeToPDF/PowerpointConverter.cs @@ -91,6 +91,9 @@ class PowerpointConverter : Converter return (int)ExitCode.ApplicationError; } } + Boolean includeProps = !(Boolean)options["excludeprops"]; + Boolean includeTags = !(Boolean)options["excludetags"]; + PpPrintOutputType printType = PpPrintOutputType.ppPrintOutputSlides; MSCore.MsoTriState nowrite = (Boolean)options["readonly"] ? MSCore.MsoTriState.msoTrue : MSCore.MsoTriState.msoFalse; bool pdfa = (Boolean)options["pdfa"] ? true : false; if ((Boolean)options["hidden"]) @@ -107,8 +110,12 @@ class PowerpointConverter : Converter { quality = PpFixedFormatIntent.ppFixedFormatIntentScreen; } - Boolean includeProps = !(Boolean)options["excludeprops"]; - Boolean includeTags = !(Boolean)options["excludetags"]; + if (!String.IsNullOrWhiteSpace((String)options["powerpoint_output"])) + { + bool printIsValid = false; + printType = PowerpointConverter.getOutputType((String)options["powerpoint_output"], ref printIsValid); + } + app.FeatureInstall = MSCore.MsoFeatureInstall.msoFeatureInstallNone; app.DisplayDocumentInformationPanel = false; app.DisplayAlerts = PpAlertLevel.ppAlertsNone; @@ -140,7 +147,7 @@ class PowerpointConverter : Converter activePresentation.Slides.InsertFromFile(inputFile, 0); } Converter.releaseCOMObject(fonts); - activePresentation.ExportAsFixedFormat(outputFile, PpFixedFormatType.ppFixedFormatTypePDF, quality, MSCore.MsoTriState.msoFalse, PpPrintHandoutOrder.ppPrintHandoutVerticalFirst, PpPrintOutputType.ppPrintOutputSlides, MSCore.MsoTriState.msoFalse, null, PpPrintRangeType.ppPrintAll, "", includeProps, true, includeTags, true, pdfa, Type.Missing); + activePresentation.ExportAsFixedFormat(outputFile, PpFixedFormatType.ppFixedFormatTypePDF, quality, MSCore.MsoTriState.msoFalse, PpPrintHandoutOrder.ppPrintHandoutVerticalFirst, printType, MSCore.MsoTriState.msoFalse, null, PpPrintRangeType.ppPrintAll, "", includeProps, true, includeTags, true, pdfa, Type.Missing); // Determine if we need to make bookmarks if ((bool)options["bookmarks"]) @@ -279,5 +286,48 @@ private static void loadBookmarks(Presentation activePresentation, ref List - Only convert worksheet in the workbook. First sheet is 1 + /powerpoint_output - Controls what is generated by output. Possible values are slides, notes, + outline, build_slides, handouts and multi-page handouts using handout2, + handout3, handout4, handout6 and handout9. The default is slides. /word_header_dist - The distance (in points) from the header to the top of the page. /word_footer_dist - The distance (in points) from the footer to the bottom diff --git a/OfficeToPDF/Properties/AssemblyInfo.cs b/OfficeToPDF/Properties/AssemblyInfo.cs index 76627f8..d42e1d8 100644 --- a/OfficeToPDF/Properties/AssemblyInfo.cs +++ b/OfficeToPDF/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.8.13.0")] -[assembly: AssemblyFileVersion("1.8.13.0")] +[assembly: AssemblyVersion("1.8.14.0")] +[assembly: AssemblyFileVersion("1.8.14.0")] diff --git a/OfficeToPDF/README.txt b/OfficeToPDF/README.txt index 9b20108..79fc083 100644 --- a/OfficeToPDF/README.txt +++ b/OfficeToPDF/README.txt @@ -73,6 +73,9 @@ The following optional switches can be used: /excel_no_recalculate - skip automatic re-calculation of formulas in the workbook /excel_template_macros - run Auto_Open macros in the /template document before conversion by Excel /excel_worksheet - only convert worksheet in the workbook. First sheet is 1 + /powerpoint_output - controls what is generated by output. Possible values are slides, notes, + outline, build_slides, handouts and multi-page handouts using handout2, + handout3, handout4, handout6 and handout9. The default is slides /word_header_dist - the distance (in points) from the header to the top of the page /word_footer_dist - the distance (in points) from the footer to the bottom