All URIs are relative to https://api.cloudmersive.com
Method | HTTP request | Description |
---|---|---|
splitDocumentDocx | POST /convert/split/docx | Split a single Word Document DOCX into Separate Documents by Page |
splitDocumentPdfByPage | POST /convert/split/pdf | Split a PDF file into separate PDF files, one per page |
splitDocumentPptx | POST /convert/split/pptx | Split a single PowerPoint Presentation PPTX into Separate Slides |
splitDocumentTxtByLine | POST /convert/split/txt/by-line | Split a single Text file (txt) into lines |
splitDocumentTxtByString | POST /convert/split/txt/by-string | Split a single Text file (txt) by a string delimiter |
splitDocumentXlsx | POST /convert/split/xlsx | Split a single Excel XLSX into Separate Worksheets |
\Swagger\Client\Model\SplitDocxDocumentResult splitDocumentDocx($input_file, $return_document_contents)
Split a single Word Document DOCX into Separate Documents by Page
Split a Word DOCX Document, comprised of multiple pages into separate Word DOCX document files, with each containing exactly one page.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');
$apiInstance = new Swagger\Client\Api\SplitDocumentApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$input_file = "/path/to/file.txt"; // \SplFileObject | Input file to perform the operation on.
$return_document_contents = true; // bool | Set to true to return the contents of each Worksheet directly, set to false to only return URLs to each resulting document. Default is true.
try {
$result = $apiInstance->splitDocumentDocx($input_file, $return_document_contents);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SplitDocumentApi->splitDocumentDocx: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
input_file | \SplFileObject | Input file to perform the operation on. | |
return_document_contents | bool | Set to true to return the contents of each Worksheet directly, set to false to only return URLs to each resulting document. Default is true. | [optional] |
\Swagger\Client\Model\SplitDocxDocumentResult
- Content-Type: multipart/form-data
- Accept: application/json, text/json, application/xml, text/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\SplitPdfResult splitDocumentPdfByPage($input_file, $return_document_contents)
Split a PDF file into separate PDF files, one per page
Split an input PDF file into separate pages, comprised of one PDF file per page.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');
$apiInstance = new Swagger\Client\Api\SplitDocumentApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$input_file = "/path/to/file.txt"; // \SplFileObject | Input file to perform the operation on.
$return_document_contents = true; // bool | Set to true to directly return all of the document contents in the DocumentContents field; set to false to return contents as temporary URLs (more efficient for large operations). Default is false.
try {
$result = $apiInstance->splitDocumentPdfByPage($input_file, $return_document_contents);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SplitDocumentApi->splitDocumentPdfByPage: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
input_file | \SplFileObject | Input file to perform the operation on. | |
return_document_contents | bool | Set to true to directly return all of the document contents in the DocumentContents field; set to false to return contents as temporary URLs (more efficient for large operations). Default is false. | [optional] |
\Swagger\Client\Model\SplitPdfResult
- Content-Type: multipart/form-data
- Accept: application/json, text/json, application/xml, text/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\SplitPptxPresentationResult splitDocumentPptx($input_file, $return_document_contents)
Split a single PowerPoint Presentation PPTX into Separate Slides
Split an PowerPoint PPTX Presentation, comprised of multiple slides into separate PowerPoint PPTX presentation files, with each containing exactly one slide.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');
$apiInstance = new Swagger\Client\Api\SplitDocumentApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$input_file = "/path/to/file.txt"; // \SplFileObject | Input file to perform the operation on.
$return_document_contents = true; // bool | Set to true to return the contents of each presentation directly, set to false to only return URLs to each resulting presentation. Default is true.
try {
$result = $apiInstance->splitDocumentPptx($input_file, $return_document_contents);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SplitDocumentApi->splitDocumentPptx: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
input_file | \SplFileObject | Input file to perform the operation on. | |
return_document_contents | bool | Set to true to return the contents of each presentation directly, set to false to only return URLs to each resulting presentation. Default is true. | [optional] |
\Swagger\Client\Model\SplitPptxPresentationResult
- Content-Type: multipart/form-data
- Accept: application/json, text/json, application/xml, text/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\SplitTextDocumentByLinesResult splitDocumentTxtByLine($input_file)
Split a single Text file (txt) into lines
Split a Text (txt) Document by line, returning each line separately in order. Supports multiple types of newlines.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');
$apiInstance = new Swagger\Client\Api\SplitDocumentApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$input_file = "/path/to/file.txt"; // \SplFileObject | Input file to perform the operation on.
try {
$result = $apiInstance->splitDocumentTxtByLine($input_file);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SplitDocumentApi->splitDocumentTxtByLine: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
input_file | \SplFileObject | Input file to perform the operation on. |
\Swagger\Client\Model\SplitTextDocumentByLinesResult
- Content-Type: multipart/form-data
- Accept: application/json, text/json, application/xml, text/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\SplitTextDocumentByStringResult splitDocumentTxtByString($input_file, $split_delimiter, $skip_empty_elements)
Split a single Text file (txt) by a string delimiter
Split a Text (txt) Document by a string delimiter, returning each component of the string as an array of strings.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');
$apiInstance = new Swagger\Client\Api\SplitDocumentApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$input_file = "/path/to/file.txt"; // \SplFileObject | Input file to perform the operation on.
$split_delimiter = "split_delimiter_example"; // string | Required; String to split up the input file on
$skip_empty_elements = true; // bool | Optional; If true, empty elements will be skipped in the output
try {
$result = $apiInstance->splitDocumentTxtByString($input_file, $split_delimiter, $skip_empty_elements);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SplitDocumentApi->splitDocumentTxtByString: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
input_file | \SplFileObject | Input file to perform the operation on. | |
split_delimiter | string | Required; String to split up the input file on | |
skip_empty_elements | bool | Optional; If true, empty elements will be skipped in the output | [optional] |
\Swagger\Client\Model\SplitTextDocumentByStringResult
- Content-Type: multipart/form-data
- Accept: application/json, text/json, application/xml, text/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\SplitXlsxWorksheetResult splitDocumentXlsx($input_file, $return_document_contents)
Split a single Excel XLSX into Separate Worksheets
Split an Excel XLSX Spreadsheet, comprised of multiple Worksheets (or Tabs) into separate Excel XLSX spreadsheet files, with each containing exactly one Worksheet.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');
$apiInstance = new Swagger\Client\Api\SplitDocumentApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$input_file = "/path/to/file.txt"; // \SplFileObject | Input file to perform the operation on.
$return_document_contents = true; // bool | Set to true to return the contents of each Worksheet directly, set to false to only return URLs to each resulting worksheet. Default is true.
try {
$result = $apiInstance->splitDocumentXlsx($input_file, $return_document_contents);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SplitDocumentApi->splitDocumentXlsx: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
input_file | \SplFileObject | Input file to perform the operation on. | |
return_document_contents | bool | Set to true to return the contents of each Worksheet directly, set to false to only return URLs to each resulting worksheet. Default is true. | [optional] |
\Swagger\Client\Model\SplitXlsxWorksheetResult
- Content-Type: multipart/form-data
- Accept: application/json, text/json, application/xml, text/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]