Let’s learn how to convert your business data files from PDF to PowerPoint using PDF REST API offered by Aspose.PDF in multiple languages with code examples.

Convert PDF To PPT

PDF REST API - PDF to PPT Node.js

Overview

Welcome to another blog post in the series of Aspose.PDF Cloud Product Family. In the recent past, we have written on interesting topics such as PDF To Excel Using Aspose.PDF Cloud SDKs For Node.js, PDF To DOC Converter – Aspose.PDF Cloud SDKs For Node.js, and more. We have also introduced Aspose.cloud in our previous blog posts. Just to recap, Aspose.cloud offers PDF REST API and software development kits for file format conversion and manipulation. Above all, these SDKs are available in multiple programming languages with comprehensive documentation regarding development and usage. However, we will explore how to convert PDF To PPT by covering the following points.

Difference between PDF and PPT file formats

PowerPoint Presentations and Portable Document Format are both very popular and widely used data representation formats. Businesses, educational institutes, and other corporate sectors massively leverage these file formats for various important operations. However, both of these file formats have their own usages, distinctions and benefits. Following are the core differences.

A PDF file is multiplatform and can be viewed on any platform and you can edit files to some extent. Whereas, PPT is a slideshow that is created by Microsoft PowerPoint.

Data security is another important factor when it comes to limiting access for a certain purpose. There is a provision available to the users to encrypt PDF files using encryption techniques. However, you can also set passwords for PowerPoint files as per need.

The size of the file also matters when the amount of data is huge. PowerPoint files acquire more space when they get complex, while PDF files offer compression that makes PDF files storage-friendly.

Business benefits of PDF to PPT converter

In the section of this Aspose.PDF tutorial in which we are going to learn how to convert PDF to PPT files by integrating a PDF to PPT Node.js library. However, we will go through the benefits of opting for PowerPoint files.

Presentations

PowerPoint files offer a great deal when it comes to giving a presentation to the audience in any meeting related to either business or education.

Support for media files

Visual impact plays a vital role to make your presentation more attractive and descriptive. Therefore, you can leverage rich media elements while making your PPT file such as images, videos, graphs, audio and more.

Sharing & Accessibility

In this modern age, organizations tend to opt for cloud-based software and services. However, you can share your PPT files with anyone over the internet. In addition, there is a feature to convert your PPT file into a video format and upload it to any platform such as Youtube.

Similarly, there are many other perks to look at and see. You can explore them yourself to get further knowledge.

How to convert PDF to PowerPoint using Aspose.PDF Cloud SDKs?

This is the section in which we will practically implement PDF to PPT converter and will convert PDF to PPT file in a Node.js application. There is PDF REST API also available but we will leverage cloud SDKs in this article. Make sure you have installed the following pre-requisites on your local machine.

After that, please visit this page to learn about setting up nest.js in case you have not installed it yet. Next, please visit this blog post where you can learn how to set up a new application at Aspose.cloud and retrieve API credentials(key, secret). The dashboard looks like the image below.

Convert PDF To PPT

Now, open the “app.controller.ts” file placed inside the ‘src’ folder, and paste the following code to enable PDF to PPT Node.js library that will convert PDF to PPT into your Node.js app.

import { Controller, Post } from '@nestjs/common';
import { AppService } from './app.service';
import { PdfApi } from 'asposepdfcloud';
import \* as fs from 'fs';
@Controller()
export class AppController {
  constructor(private readonly appService: AppService) {}
  @Post('/pdf-to-pptx')
  async pdfToDoc() {
    const name = 'sample.pdf';
    const SrcFile = '/' + name;
    const detFolder = '/myfolder';
    const resultFile = 'sample.pptx';
    const resultPath = 'myfolder/' + resultFile;
    const storageName = 'testing';
    const fileToWrite = process.cwd() + '/' + resultFile;
    const pdfApi = new PdfApi(
      'YOUR-APPSID',
       'YOUR-APPKEY',
    );
    try {
      // Upload file to aspose cloud storage
      const data = fs.readFileSync(name);
      await pdfApi.uploadFile(SrcFile, new Buffer(data), storageName);
      // Invoke Aspose.Pdf Cloud SDK API to create PDF file from HTML
      await pdfApi.putPdfInStorageToPptx(
        'sample.pdf',
        '/myfolder/sample.pptx',
        null,
        null,
        null,
        'testing',
      );
      // Download pdf from cloud storage
      const fileData = await pdfApi.downloadFile(resultPath, storageName, '');
      const writeStream = fs.createWriteStream(fileToWrite);
      writeStream.write(fileData.body);
      return 'PDF converted to PPTX successfully';
    } catch (e) {
      throw e;
    }
  }
}

In addition, place your source PDF file in your project’s root directory. Lastly, save the code and start the server by running ’npm run start’ and make a post request at http://localhost:3000/pdf-to-pptx. Upon successful call, the converted file will be downloaded into your project’s root directory. However, you can access the generated file on the cloud-based dashboard of Aspose.cloud. This is how we can use the cloud SDKs. However, you may also invoke the PDF REST API offered by Aspose.PDF.

Conclusion

This is the end of this PDF to PPT Node.js library tutorial. We have gone through how to convert PDF to PPT using the PDF to PPT converter. Online businesses tend to equip their business software with an online file converter. Therefore, we also have covered the benefits attached with converting PDF to PowerPoint. However, you can visit other interesting blog posts listed in the ‘Explore’ section below. Moreover, you can test this PDF REST API using a Swagger UI.

Convert PDF To PPT

Finally, blog.aspose.cloud is continuously writing further articles in the series of Aspose.PDF Cloud Product Family. Therefore, please stay connected for regular updates. However, you can follow us on our social media accounts Facebook, LinkedIn, and Twitter.

Ask a question

Feel free to visit our forum which is very active to respond to questions and queries/discussions.

Explore

You may find the following links relevant: