Using PHP to convert PPT to JPG

Use the sample PHP code below to easily and quickly convert PPT files to the JPG format. Transforming Microsoft Powerpoint presentations into this widely used image format, get started converting PPT files in minutes and integrate directly into your PHP application to save time and effort. We provide a free Test account to try the service out, comprehensive documentation and support from developers.

PPT to JPG
PPT
JPG

PHP Code Sample

1. Install the Zamzar SDK

composer require zamzar/zamzar-php

2. Convert a file

<?php

// Signup for a Zamzar API Account or retrieve your existing API Key from https://developers.zamzar.com
$zamzar = new \Zamzar\ZamzarClient('YOUR_API_KEY_GOES_HERE');

// Converts /tmp/example.ppt to /tmp/example.jpg
$zamzar
    ->jobs->create([
        'source_file' => '/tmp/example.ppt',
        'target_format' => 'jpg'
    ])
    ->waitForCompletion();
    ->downloadTargetFiles('/tmp/');
    ->deleteAllFiles();

Why Use Zamzar?

Highly Reliable

Our conversion service is there when you need it. Converting since 2006, our API had >99.99% uptime over the last 12 months.

Cloud API

Our cloud based platform scales to meet your demands, whether it's 1 file or 100,000. We manage everything so you don't have to.

All the formats

We support a huge range of conversions - over 1,100 in all. Including documents, videos, images, audio, eBooks, CAD files and more.

Secure & compliant

Our API uses strong encryption of data in transit (and at rest), firewalls, process isolation and state of the art data centers. We are fully GDPR compliant.

One simple API for all your file conversions. Supported on any platform.

Get Started Now

Customer Reviews

We have found our experience with Zamzar over the years we have used it to be fantastic.

They were receptive to a tiered pricing structure as our requirements changed, have a friendly support team that is always helpful and their API that we use daily to send documents to for conversion has always been available and had no issues.

Person Icon

Robin L

Technical Director | Real Estate

The service just works. We've tried other file conversion services in the past, and the results were very disappointing.

With Zamzar, the results are consistently good. Also, their support is friendly and responsive.

Person Icon

Bruno D

Chief Architect | Computer Software

We needed a product to upload HTML content, convert and download as a PDF. Zamzar's API provided not only the service required but easy to understand stepped-process to implement.

This business process was critical - but I don't believe we ever had a failure over years of daily use.

Person Icon

Davd M

Business Owner | IT Services

As Used By

Print with me
Thomson Reuters
Columbia University
Xerox

Security and Compliance

Security

Physical access to Zamzar infrastructure is strictly controlled at perimeter and building ingress points by professional security staff utilising video surveillance.

Data Transfer

All traffic to and from Zamzar servers is secured by TLS/SSL. No third-party is able to read or tamper with data exchanged in connections to our servers.

Data at Rest

We encrypt files stored on disk with a unique key and multi-factor encryption so that data is unreadable if hardware is physically compromised.

Passwords

Zamzar API user passwords are stored in our database after being salted and hashed using the secure Bcrypt encryption algorithm.

Firewalls

Zamzar uses multiple different firewall technologies to ensure that different components of its systems are logically isolated from one another.

Using PPT with PHP

Using PPT with PHP

Powerpoint files can be manipulated through a number of open source tools. You could consider using the PHP Presentation open source software library which is written in pure PHP (and licensed under LGPL version 3). It supports both the reading and writing of Powerpoint files, but does have some limitations around rendering - for example losing styling in some cases. It is however actively updated so over time bugs and issues are being fixed.

Another option is to use LibreOffice Impress, this is an actively developed solution for reading and writing Powerpoint files, however it's automation API is limited in PHP. It does have some fairly well documented rendering issues too, for example with SmartArt presentations. Think carefully before using it if rendering is an important cog in your conversion needs, but as a low cost solution this might suffice.

If you need commercial software that renders as accurately as the native Microsoft Office tooling then you could consider using the Zamzar API. With a dedicated support team, code examples in many of the major languages including PHP, simple low cost conversion credits and support for direct import and export to S3, it may cover most of the use cases you require. Feel free to reach out to our support team with any questions or dip into the getting started guide in our docs.

Resources:
  • Joel Spolsky article on why Microsoft Office formats are so complicated.
  • OpenTBS for merging LibreOffice, OpenOffice and MS Office documents with PHP
Related StackOverflow Questions:

Using JPG with PHP

Using JPG with PHP

You have a number of options when looking to convert JPG files using PHP and each of them have various pros and cons. You could consider using the GD PHP library which has quite extensive support for image processing and has a large number of online resources which you can use as a great reference guide when writing your code.

Another option is to use an open source tool such as ImageMagick, which is known as the "Swiss Army Knife" of image processing. It has a large number of configurable options and is fairly easily configurable through a handy object-oriented interface - see these examples. It also has extensive documentation and there is a wide body of online support in forums should you hit technical issues.

If you'd prefer to use commercial software with dedicated support from developers and a high quality rendering engine you could consider using the Zamzar API. With code examples in many of the major languages including PHP, simple low cost conversion credits and support for direct import and export to S3, it may cover most of the use cases you have. Feel free to reach out to our support team with any questions or dip into the getting started guide in our docs.

Resources:
Related StackOverflow Questions:

Join thousands of happy customers - start converting files in just a few minutes.

Get Started Now