cognidox / OfficeToPDF

A command line tool to convert Microsoft Office documents to PDFs
https://www.cognidox.com/
Other
610 stars 137 forks source link

Feature: Is there a means to output a handout with out headers and footers? #22

Closed rniedosmialek closed 6 years ago

rniedosmialek commented 6 years ago

Is there or could there be an option to export handouts for PowerPoint presentations with control over headers and footers? If this already exists but some undocumented manor please let me know.

vittala commented 6 years ago

Hi

There isn't a mechanism at the moment, but it should be possible to add, as exporting handouts to PDF is supported by the API. We'll look at adding a control switch in the next release.

Regards Vittal

vittala commented 6 years ago

Hi

You can try a pre-release https://github.com/cognidox/OfficeToPDF/releases/tag/1.8.14.0 which provides the /powerpoint_output switch. To have it output handouts rather than slides, use "/powerpoint_output handouts" as an option on the command line.

Normal headers/footers from PowerPoint are included.

Regards Vittal

rniedosmialek commented 6 years ago

I will give it a run through now and see how it goes.

vittala commented 6 years ago

FYI, you can control the number of handouts put on a page by using the values handouts2, handouts3, handouts4, handouts6 and handouts9 for /powerpoint_output.

Regards Vittal

rniedosmialek commented 6 years ago

I have run unique presentations with each output param option for handouts and all came out as expected (handouts2, handouts3, handouts4, handouts6 and handouts9 for /powerpoint_output). Great update for functionality and very much appreciated.

I did notice that the header output varies based on presentation as some have the placeholders for date and page number and some have them stripped out. Do you know of a means to strip headers and/or footers in a pre-batch tool as OfficeToPDF does not currently?

vittala commented 6 years ago

Hi

I believe that header, footers, page number and date/time are all pulled from the master layouts stored in the file. I don't know of anything that can batch strip them, but you could probably have some VBA that opened the file, and changed the visibility of the items by looping through the HeaderFooter items in the various masters.

https://msdn.microsoft.com/en-us/library/microsoft.office.interop.powerpoint.headerfooter(v=office.14).aspx

Regards Vittal