4 ms·
I'd be really interested in this if there were a way to get Python to render a ppt into a pdf. Basically, the goal would be to programmatically add a unique wa
by bryogenic 13y ago
I'd be really interested in this if there were a way to get Python to render a ppt into a pdf. Basically, the goal would be to programmatically add a unique watermark to each ppt, render the pdf, and save it. Doing this for 100+ things is not worth the time but if Python can script it up it might be worth investigating. Looks like I need to go read the COM api a bit.
- orf 13y agoThis can be done really easily. I've done a lot of work with the Office COM API and Python, despite it being a bit weird at times its pretty nice to work with. The best bit (IMO) is you can record a macro within an Office application then translate that very very very easily to Python code, and it just works.
- mataug 13y agoThis is precisely what the author told during his talk today at PyconIndia2013. He said that he wrote a bunch of macros and translated then into python
- harrytuttle 13y agowordInstance.ActiveDocument.SaveAs(filename + ".pdf", 17) 17 is the magic number for PDF output. There is a constant in VSTO and COM for it but I can't remember what it is. Need Office 2007 with save as pdf addon installed or vanilla 2010/2013. People always say that APIs are the future and Microsoft are dead etc but Microsoft stuff is usually chock full of extensibility and knee deep in documentation. To give you an idea, it took me merely two days to extend word 2010 via VSTO with a fully GUI and ribbon integrated semantic template engine that allows documents to be bound to our public API and rendered server side or client side online and offline. Do that in Google Apps? Yeah right... also my solution will still be supported until 2023!
- bliti 13y agoI did a simple application for a client that was a simple JSON-to-Excel dump. It was a breeze. Took me about a day to do it. From zero to finished.