Convert an XLSX File to PDF in PHP

composer require cloudmersive/cloudmersive_document_convert_api_client
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
$apiInstance = new Swagger\Client\Api\ConvertDocumentApi(


new GuzzleHttp\Client(),
$config
);
$input_file = "/path/to/inputfile"; // \SplFileObject | Input file to perform the operation on.
try {
$result = $apiInstance->convertDocumentXlsxToPdf($input_file);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ConvertDocumentApi->convertDocumentXlsxToPdf: ', $e->getMessage(), PHP_EOL;
}
?>

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Experience at LetGrowMore.

Automate your Intercom workflows with Zapier

Securing REST API

Five Productivity Hacks for Coders

3 Python Packages to Hide Passwords and Secrets From Your Code

What Are The Pros And Cons Of Using Vue.js

Cloud Native means serverless

HUFFMAN CODING

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
Cloudmersive

Cloudmersive

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

More from Medium

How To Enable PHP Debugging with XDebug and Visual Studio Code (Windows and Xampp)

Laravel 8 Inner Join Query Example

How to use Monolog with a custom WordPress plugin | LAMPStack Ninja

run artisan command in cpanel

php laravel artisan in cPanel