0

Using convertapi, I would like to set range and convert only selected area to pdf. Is this possible?

<?php
require_once('vendor/autoload.php');
require_once 'vendor/convertapi/convertapi- 
php/lib/ConvertApi/ConvertApi.php';
use \ConvertApi\ConvertApi;
ConvertApi::setApiSecret('secret');
$result = ConvertApi::convert('pdf', [
    'File' => 'output/spreadsheet_2.xlsx',
], 'xlsx'
);
$result->saveFiles('output');
?>

Thanks in advance.

Premlatha
  • 1,676
  • 2
  • 20
  • 40

2 Answers2

1

Currently you can set only WorksheetName or WorksheetIndex parameters for narrowing down what you want to convert.

Jonas
  • 4,683
  • 4
  • 45
  • 81
0

If you want to convert a range of sheets, you can only loop on the range, each time converting a separate PDF from one sheet at a time. No better choice up until now.

Tiki-Web
  • 106
  • 8