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

Normalize a Street Address in Ruby

在.Net和Python程式使用DLL檔案

cash map customer care number=.6291254324=.8695215043

8 Mistakes That Every Python Programmer Should Avoid

Hot to make Elastic Beanstalk log Sidekiq or anything else on Amazon Linux 2 to CloudWatch Logs

Scan a URL for Safety Threats in Java

AWS Lambda Extensions: What are they and why do they matter

no need to know the root password of OS X 10.10 and 10.11

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

Deploying Laravel to Heroku via Git (CD)

How to Send a Message by WhatsApp API using PHP easily

WhatsApp API using PHP

PhpStorm, Docker and Xdebug 3 on PHP 8.1 in 2022 [Tutorial Part 4.2]

PhpStorm new CLI interpreter

Top 10 Programming Languages to Consider in 2022