How to convert PowerPoint PPTX to PDF in Salesforce Apex

There are many reasons to convert a PPTX into a PDF, whether it’s for web compatibility, printing, etc. Regardless, you need a quick and easy solution. Well, you came to the right place.

To kick things off, download our API here and copy the /client folder into your project.

Now call convertDocumentPptxToPdf:

SwagConvertDocumentApi api = new SwagConvertDocumentApi();SwagClient client = api.getClient();// Configure API key authorization: ApikeyApiKeyAuth Apikey = (ApiKeyAuth) client.getAuthentication('Apikey');Apikey.setApiKey('YOUR API KEY');Map<String, Object> params = new Map<String, Object>{'inputFile' => Blob.valueOf('Sample text file\nContents')};try {// cross your fingersBlob result = api.convertDocumentPptxToPdf(params);System.debug(result);} catch (Swagger.ApiException e) {// ...handle your exceptions}

Done! Not bad, right? This same approach is available for hundreds of other useful similar functions through our APIs. These include numerous format conversions, document editing, and more.

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store