PptxGenJS and Servoy

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

PptxGenJS and Servoy

Postby swingman » Fri Jul 08, 2022 12:46 pm

Hi, there is a javascript library called PptxGenJS for creating native PowerPoint presentations.
How would I use this with Servoy?

C
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: PptxGenJS and Servoy

Postby sbutler » Mon Jul 11, 2022 4:56 pm

3 options plus an extra I can think of.

1. You build an NGService out of it. Just include the browser version of the JS as a dependency, and then you'll need to build the wrapper calls so Servoy can make the API calls to the component. However, if you do it that way, you're doing it all in the browser, which seems a little odd to me. This is generally the kind of thing you'd want to do server-side IMHO.

2. You take the browser version of the JS, and paste it into a new scope in Servoy, and fiddle with it to get it working. Replacing all the browser/DOM calls with Servoy equivalent calls. This can be a lot of work depending on how much of the Browser DOM API the library is using. Once complete, you could call it and it would make the PDF's server-side that you could then stream to the end user as needed.

3. You take the Node version of the JS lib and build your own little API wrapper around it. So it runs separate from your Servoy solution and you can make API calls to it and have it generate the PDF's for you.

Extra option, consider the Apache POI (with poi-ooxml) Java library that you can just drop into the plugins folder and make Java calls to. https://poi.apache.org/components/slide ... hapes.html
No personal experience with it, but its probably where I'd start.

There are also other java libraries, like those from Aspose, but they are very expensive. They do have a cloud version where you can hit their hosted API and pay per use https://docs.aspose.cloud/slides/add-a- ... sentation/

This one also looked cool and cheaper: https://powerpointgeneratorapi.com/
Scott Butler
iTech Professionals, Inc.
SAN Partner

Servoy Consulting & Development
Servoy University- Training Videos
Servoy Components- Plugins, Beans, and Web Components
Servoy Guy- Tips & Resources
ServoyForge- Open Source Components
User avatar
sbutler
Servoy Expert
 
Posts: 759
Joined: Sun Jan 08, 2006 7:15 am
Location: Cincinnati, OH

Re: PptxGenJS and Servoy

Postby swingman » Tue Jul 12, 2022 11:14 am

Hi Scott,

Thanks for this thorough overview.

I was thinking of doing no. 3, but seeing the https://powerpointgeneratorapi.com/ I will investigate it further, it looks like it will do the job nicely.
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 8 guests