Pricing question = how many credits in this code sample?

Hello,

We’re trying to manipulate PPT files slide per slide, meaning :

  • Upload a PPT file

  • Show a thumbnail of each slide

  • Pick slides and create a new PPT file from the slides picked

Looks doable from your API, but it looks like the pricing might be prohibitive if this create many API calls.
Could you give me an example of how many API calls this would require for let’s say 1000 slides ?

Because when I see this code I’m thinking that only creating the thumbnails would require 2 api calls per slide, so then injecting them back into a presentation would already blow up the 3000 credits of the 99$ plan, just for the first 1000 slides processed.

Thanks !

@albandum

Thanks for your inquiry. Please note, in current pricing plan each API call counts for one credit.

For your workflow a presentation with 1000 slides will consume 1002 credits ideally. One API call for uploading presentation, 1000 calls for each slide to convert it to thumbnail image and 1 call to merge selected slides into a single presentation. Please also check Aspose.Slides Cloud SDK for Python to consume Aspose.Slides Cloud API directly in your application.

I’m not sure what language you are using to access the API, but here is an alternative. The exact calls would vary a little bit depending on the libraries and language you are using. The workflow below only uses 3 API calls

Upload the presentation = 1 API call
Save the presentation as a PDF = 1 API call
Use something like image magic (in PHP imagick) to open the save each page as a png = 0 API calls (all done locally; there are versions of image magic for every environment)
Assemble the PPTX using a merge slide API call = 1 API call (see note below)
Total of 3 API calls

In PHP to save the images as pngs

    $pdfSafe = aspConvertFormatSaveLocal($slidesApi, $_FILES['inputFile']['tmp_name'], "Pdf", "sources/S$fileId.pdf");
    $imagick = new Imagick();
    $imagick->readImage("sources/S$fileId.pdf");
    $imagick->writeImages("sources/S$fileId.png", false);   

(the asp… calls are my own wrappers to make the ASPOSE more friendly)
(note about merge slides API call-- there seems to some bug here if the merge is too big, I’ve broken my merge into multiple calls requiring opening only max of 5 presentations, YMMV)

One more comment that might be useful to someone in the future… making 1000 calls will take a really long time. Aspose calls are pretty slow… figure about 10 to 15 seconds for each call to complete, so your 1000 calls will take about 3 hours!

Don’t to that!

@klubar

Usually processing time depends upon the slide/content size. Recently we have further increased the server memory. However, if you still face any slow processing issue. Share your sample document and API Method/code here. We will investigate it.