antonioleutsch/stirling-pdf-sdk

PHP SDK for the Stirling PDF API - PDF processing, conversion, manipulation, security and more.

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/antonioleutsch/stirling-pdf-sdk

v1.0.0 2026-02-10 08:47 UTC

This package is auto-updated.

Last update: 2026-02-10 08:50:37 UTC


README

PHP SDK for the Stirling PDF API - PDF processing, conversion, manipulation, security and more.

Installation

Requirements

  • PHP 8.1 or later
  • PHP extensions: curl, json, mbstring

Composer

composer require antonioleutsch/stirling-pdf-sdk

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');




$apiInstance = new OpenAPI\Client\Api\AnalysisApi(
    // 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()
);
$file_input = '/path/to/file.txt'; // \SplFileObject
$file_id = 'file_id_example'; // string | File ID for server-side files (can be used instead of fileInput)

try {
    $result = $apiInstance->getAnnotationInfo($file_input, $file_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AnalysisApi->getAnnotationInfo: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.stirling.com

Class Method HTTP request Description
AnalysisApi getAnnotationInfo POST /api/v1/analysis/annotation-info Get annotation information
AnalysisApi getBasicInfo POST /api/v1/analysis/basic-info Get basic PDF information
AnalysisApi getDocumentProperties POST /api/v1/analysis/document-properties Get PDF document properties
AnalysisApi getFontInfo POST /api/v1/analysis/font-info Get font information
AnalysisApi getFormFields POST /api/v1/analysis/form-fields Get form field information
AnalysisApi getPageCount POST /api/v1/analysis/page-count Get PDF page count
AnalysisApi getPageDimensions POST /api/v1/analysis/page-dimensions Get page dimensions for all pages
AnalysisApi getSecurityInfo POST /api/v1/analysis/security-info Get security information
ConvertApi convertEmlToPdf POST /api/v1/convert/eml/pdf Convert EML to PDF
ConvertApi convertToImage POST /api/v1/convert/pdf/img Convert PDF to image(s)
ConvertApi convertToPdf POST /api/v1/convert/img/pdf Convert images to a PDF file
ConvertApi htmlToPdf POST /api/v1/convert/html/pdf Convert an HTML or ZIP (containing HTML and CSS) to PDF
ConvertApi markdownToPdf POST /api/v1/convert/markdown/pdf Convert a Markdown file to PDF
ConvertApi pdfToCsv POST /api/v1/convert/pdf/csv Extracts a CSV document from a PDF
ConvertApi pdfToPdfA POST /api/v1/convert/pdf/pdfa Convert a PDF to a PDF/A
ConvertApi processFileToPDF POST /api/v1/convert/file/pdf Convert a file to a PDF using LibreOffice
ConvertApi processPdfToHTML POST /api/v1/convert/pdf/html Convert PDF to HTML
ConvertApi processPdfToMarkdown POST /api/v1/convert/pdf/markdown Convert PDF to Markdown
ConvertApi processPdfToPresentation POST /api/v1/convert/pdf/presentation Convert PDF to Presentation format
ConvertApi processPdfToRTForTXT POST /api/v1/convert/pdf/text Convert PDF to Text or RTF format
ConvertApi processPdfToWord POST /api/v1/convert/pdf/word Convert PDF to Word document
ConvertApi processPdfToXML POST /api/v1/convert/pdf/xml Convert PDF to XML
ConvertApi urlToPdf POST /api/v1/convert/url/pdf Convert a URL to a PDF
FilterApi containsImage POST /api/v1/filter/filter-contains-image Checks if a PDF contains an image
FilterApi containsText POST /api/v1/filter/filter-contains-text Checks if a PDF contains set text, returns true if does
FilterApi fileSize POST /api/v1/filter/filter-file-size Checks if a PDF is a set file size
FilterApi pageCount POST /api/v1/filter/filter-page-count Checks if a PDF is greater, less or equal to a setPageCount
FilterApi pageRotation POST /api/v1/filter/filter-page-rotation Checks if a PDF is of a certain rotation
FilterApi pageSize POST /api/v1/filter/filter-page-size Checks if a PDF is of a certain size
GeneralApi autoSplitPdf1 POST /api/v1/general/split-by-size-or-count Auto split PDF pages into separate documents based on size or count
GeneralApi createBookletImposition POST /api/v1/general/booklet-imposition Create a booklet with proper page imposition
GeneralApi cropPdf POST /api/v1/general/crop Crops a PDF document
GeneralApi deletePages POST /api/v1/general/remove-pages Remove pages from a PDF file
GeneralApi editTableOfContents POST /api/v1/general/edit-table-of-contents Edit Table of Contents
GeneralApi extractBookmarks POST /api/v1/general/extract-bookmarks Extract PDF Bookmarks
GeneralApi mergeMultiplePagesIntoOne POST /api/v1/general/multi-page-layout Merge multiple pages of a PDF document into a single page
GeneralApi mergePdfs POST /api/v1/general/merge-pdfs Merge multiple PDF files into one
GeneralApi overlayPdfs POST /api/v1/general/overlay-pdfs Overlay PDF files in various modes
GeneralApi pdfToSinglePage POST /api/v1/general/pdf-to-single-page Convert a multi-page PDF into a single long page PDF
GeneralApi rearrangePages POST /api/v1/general/rearrange-pages Rearrange pages in a PDF file
GeneralApi removeImages POST /api/v1/general/remove-image-pdf Remove images from file to reduce the file size.
GeneralApi rotatePDF POST /api/v1/general/rotate-pdf Rotate a PDF file
GeneralApi scalePages POST /api/v1/general/scale-pages Change the size of a PDF page/document
GeneralApi splitPdf POST /api/v1/general/split-pdf-by-sections Split PDF pages into smaller sections
GeneralApi splitPdf1 POST /api/v1/general/split-pdf-by-chapters Split PDFs by Chapters
GeneralApi splitPdf2 POST /api/v1/general/split-pages Split a PDF file into separate documents
MiscApi addAttachments POST /api/v1/misc/add-attachments Add attachments to PDF
MiscApi addPageNumbers POST /api/v1/misc/add-page-numbers Add page numbers to a PDF document
MiscApi addStamp POST /api/v1/misc/add-stamp Add stamp to a PDF file
MiscApi autoSplitPdf POST /api/v1/misc/auto-split-pdf Auto split PDF pages into separate documents
MiscApi decompressPdf POST /api/v1/misc/decompress-pdf Decompress PDF streams
MiscApi extractHeader POST /api/v1/misc/show-javascript Grabs all JS from a PDF and returns a single JS file with all code
MiscApi extractHeader1 POST /api/v1/misc/auto-rename Extract header from PDF file
MiscApi extractImageScans POST /api/v1/misc/extract-image-scans Extract image scans from an input file
MiscApi extractImages POST /api/v1/misc/extract-images Extract images from a PDF file
MiscApi flatten POST /api/v1/misc/flatten Flatten PDF form fields or full page
MiscApi metadata POST /api/v1/misc/update-metadata Update metadata of a PDF file
MiscApi optimizePdf POST /api/v1/misc/compress-pdf Optimize PDF file
MiscApi overlayImage POST /api/v1/misc/add-image Overlay image onto a PDF file
MiscApi processPdfWithOCR POST /api/v1/misc/ocr-pdf Process a PDF file with OCR
MiscApi removeBlankPages POST /api/v1/misc/remove-blanks Remove blank pages from a PDF file
MiscApi repairPdf POST /api/v1/misc/repair Repair a PDF file
MiscApi replaceAndInvertColor POST /api/v1/misc/replace-invert-pdf Replace-Invert Color PDF
MiscApi scannerEffect POST /api/v1/misc/scanner-effect Apply scanner effect to PDF
MiscApi unlockPDFForms POST /api/v1/misc/unlock-pdf-forms Remove read-only property from form fields
PipelineApi handleData POST /api/v1/pipeline/handleData Execute automated PDF processing pipeline
SecurityApi addPassword POST /api/v1/security/add-password Add password to a PDF file
SecurityApi addWatermark POST /api/v1/security/add-watermark Add watermark to a PDF file
SecurityApi getPdfInfo POST /api/v1/security/get-info-on-pdf Summary here
SecurityApi redactPdfAuto POST /api/v1/security/auto-redact Redacts listOfText in a PDF document
SecurityApi redactPdfManual POST /api/v1/security/redact Redacts areas and pages in a PDF document
SecurityApi removeCertSignPDF POST /api/v1/security/remove-cert-sign Remove digital signature from PDF
SecurityApi removePassword POST /api/v1/security/remove-password Remove password from a PDF file
SecurityApi sanitizePDF POST /api/v1/security/sanitize-pdf Sanitize a PDF file
SecurityApi signPDFWithCert POST /api/v1/security/cert-sign Sign PDF with a Digital Certificate
SecurityApi validateSignature POST /api/v1/security/validate-signature Validate PDF Digital Signature

Models

Authorization

Endpoints do not require authorization.

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

contact@stirlingpdf.com

License

MIT - see LICENSE for details.

Credits

This PHP package is automatically generated by the OpenAPI Generator project.