Skip to content

Latest commit

 

History

History
356 lines (256 loc) · 15.1 KB

File metadata and controls

356 lines (256 loc) · 15.1 KB

Swagger\Client\SplitDocumentApi

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

splitDocumentDocx

\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.

Example

<?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;
}
?>

Parameters

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]

Return type

\Swagger\Client\Model\SplitDocxDocumentResult

Authorization

Apikey

HTTP request headers

  • 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]

splitDocumentPdfByPage

\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.

Example

<?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;
}
?>

Parameters

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]

Return type

\Swagger\Client\Model\SplitPdfResult

Authorization

Apikey

HTTP request headers

  • 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]

splitDocumentPptx

\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.

Example

<?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;
}
?>

Parameters

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]

Return type

\Swagger\Client\Model\SplitPptxPresentationResult

Authorization

Apikey

HTTP request headers

  • 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]

splitDocumentTxtByLine

\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.

Example

<?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;
}
?>

Parameters

Name Type Description Notes
input_file \SplFileObject Input file to perform the operation on.

Return type

\Swagger\Client\Model\SplitTextDocumentByLinesResult

Authorization

Apikey

HTTP request headers

  • 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]

splitDocumentTxtByString

\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.

Example

<?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;
}
?>

Parameters

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]

Return type

\Swagger\Client\Model\SplitTextDocumentByStringResult

Authorization

Apikey

HTTP request headers

  • 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]

splitDocumentXlsx

\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.

Example

<?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;
}
?>

Parameters

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]

Return type

\Swagger\Client\Model\SplitXlsxWorksheetResult

Authorization

Apikey

HTTP request headers

  • 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]