How you can convert ppt or pdf recordsdata to png pictures utilizing Node JS – 1Advisor

Should you’re not conversant in what PPT or PDF is, let me provide you with a fast look.
PPT is Microsoft PowerPoint’s presentation file format. Textual content, information, charts, graphs, music, and different multimedia recordsdata can all be saved with this file extension. Whereas, PDF (Transportable Doc Format) is a universally appropriate file format based mostly on PostScript. Nevertheless, PDFs are laborious to edit, and typically it’s a problem to even extract data.
PNG file is a Transportable Community Graphics file that helps transparency and shops pictures utilizing much less information compression. It’s notable for being prime quality, extensively supported.

I used to be engaged on a challenge for one in all our shoppers. As part of the brand new function addition, our consumer needs to have particular performance, which is changing a pdf or ppt/pptx file to separate pictures. Implementing this function within the software was a bit difficult.

After conducting intense analysis, I discovered a technique to combine this function into the App. Within the Ubuntu platform, unoconv, spawn and LibreOffice are supported with Node JS. Using this platform allows us to transform ppt or pdf recordsdata to png pictures effectively.

  • unoconv is a command-line program primarily used to transform between completely different workplace doc file codecs.
  • Spawn is a postfix exterior command spawner.
  • LibreOffice is an workplace productiveness software program suite that could be a nice various to the Microsoft Workplace Suite of instruments.

These are the step-by-step information,

Step 01: Set up node js
sudo apt set up Nodejs
Step 02: Set up npm
sudo apt set up npm
Step 03: Set up unoconv (common convertor)
sudo apt-get set up unoconv
Step04: Set up libreoffice
sudo apt-get set up libreoffice
Step 05: Set up pdftoppm
sudo apt-get set up poppler-utils
Step 06: Permit your root paths
sudo npm set up -g --unsafe-perm=true --allow-root
Step 07: Set up
sudo apt-get set up poppler-utils
Step 08: Set up child-process and import
npm i child_process
Step 09: Convert ppt to pdf command
unoconv --export High quality=100 samplepptx.pptx samplepptx.pdf
Be aware:- Be sure pdf title is similar as ppt title
Step 10: Convert pdf to png command
pdftoppm samplepptx.pdf output -png
Be aware:- output is the vacation spot folder
Step 11: Then use the beneath features to transform ppt to png and pdf to png
PPT recordsdata first convert to pdf after which convert to png pictures.
Pdf recordsdata straight convert to png pictures.
Platforms (Internet, Cellular, And so on.) – Internet
Applied sciences or frameworks or instruments – NodeJs, NestJs
Platforms (Internet, Cellular, And so on.) – Ubuntu
Mushy Suave is a number one software program supplier that permits you to hire NodeJS developers with 5+ years of expertise. They’ve immense technical expertise and information that assist us to develop extremely interactive Apps with restricted funds and time. Plus, they’ll successfully work with high NodeJS instruments like Specific.js, Socket.io, Meteor, Keystone, Koa.js, PM2, Electrode.js, and Babel.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top