A PHP library for low level access of PDF files

SetaPDF-Core

Access PDF documents at their lowest level with PHP

Manual for SetaPDF-Core

The manual and API documentation of the SetaPDF-Core component can be found here.

Following its table of content:

  1. Installation
    1. System Requirement
    2. Installation
      1. With Composer
    3. Instructions for Trial Versions
      1. Ioncube
      2. With Composer
    4. Version Information
  2. Getting Started
    1. Loading Components
      1. With Composer
    2. Error Handling
  3. Memory Usage
    1. Introduction
    2. Releasing Memory in PHP 5.2
    3. Common Memory Management
  4. Readers and Writers
    1. Readers
      1. Stream
      2. File
      3. String
      4. Max File Reader and Handler
    2. Writers
      1. Echo
      2. File
      3. HTTP
      4. HTTP Stream
      5. Stream
      6. TempStream
      7. String
      8. Variable
      9. Temporary File
      10. Chaining Writers
    3. Reading and Writing From/To the Same File
    4. Stream Wrappers
      1. Amazon S3
    5. Create a New Writer
      1. Introduction
      2. Write Your Own Writer Class
  5. The Document Class
    1. Introduction
    2. Creating Instances
      1. Loading an Existing Document
      2. Loading Encrypted/Protected Documents
    3. Saving a Document
      1. Cross-Reference Information
  6. Metadata
    1. Introduction
    2. Get an Instance of the Info Object
    3. Set and Get Common Entries
    4. Set and Get Custom Entries
    5. Get and Set Several Values at a Time
    6. The Document Metadata Stream
      1. Synchronize Document Information with Metadata Stream
      2. Add or Update the XMP Data Manually
  7. Pages
    1. Introduction
    2. Get an Instance of the Pages Object
    3. Count Pages
    4. Get a Page Object
    5. Delete Pages
    6. Create a Page
    7. Append or Prepend a Page
    8. Copy Pages Between Document Instances
    9. The Page Object
      1. Introduction
      2. Get the Page Size
      3. Page Boundaries
      4. Page Rotation
      5. Page Orientation
      6. Annotations
      7. Contents
        1. Encapsulate Existing Content in a Graphic State
      8. Canvas
      9. Additional Actions
      10. Transform a Page Into a Form XObject
  8. Canvas
    1. Introduction
    2. Get an Instance
      1. Working with Existing Pages or Form XObjects
    3. The Canvas Instance
    4. Helpers
      1. Path Helper
      2. Draw Helper
      3. Text Helper
  9. Page Layout and Mode
    1. Page Layout
    2. Page Mode
    3. Example
  10. Viewer Preferences
    1. Introduction
    2. The Viewer Preferences Class
      1. Methods
      2. Constants
    3. Examples
  11. Document Outline
    1. Introduction
    2. Get an Instance of the Outlines Class
    3. Navigate through the Outline
    4. The Outlines Item Class
      1. Create an Item
      2. Configure Appearance and Behavior
      3. Add an Item to the Outline
    5. Open and Close Items
    6. Examples
  12. Page Labels
    1. Introduction
    2. Handling Page Labels of Existing Documents
    3. Define Page Labels
  13. Actions
    1. Introduction
    2. Available Action Classes
    3. Chaining Actions
    4. Using Actions
      1. Document Actions
      2. Page Actions
  14. Destinations
    1. Introduction
    2. The Destination Class
    3. Examples
      1. Explicit vs. Named Destinations
  15. Annotations
    1. Introduction
    2. The Annotations Helper
      1. Annotation Types
      2. Getting Annotations By Their Type
    3. Annotation Class
      1. Introduction
      2. Methods
    4. Markup Annotation Class
      1. Introduction
      2. Methods
      3. Example
    5. Text Annotation Class
      1. Introduction
      2. Methods
      3. Example
    6. Link Annotation Class
      1. Introduction
      2. Methods
      3. Example
    7. Square and Circle Annotation Classes
      1. Introduction
      2. Methods
      3. Example
    8. Text Markup Annotation Classes
      1. Introduction
      2. Methods
      3. Example
    9. Rubber Stamp Annotation Class
      1. Introduction
      2. Methods
      3. Examples
        1. Add Two Rubber Stamp Annotations
        2. Add Rubber Stamp Annotations With Individual Appearance
    10. Widget Annotation Class
      1. Introduction
      2. Methods
    11. File Attachment Annotation Class
      1. Introduction
      2. Methods
      3. Example
  16. Embedded File Streams
    1. Introduction
    2. The EmbeddedFileStream Class
    3. The FileSpecification Class
    4. The EmbeddedFiles Name Tree
    5. Examples
      1. Add Attachments / Embedded Files
      2. Get Attachments / Embedded Files
  17. Colors and Color Spaces
    1. Introduction
    2. Colors
    3. Color Spaces
  18. Page Formats and Boundaries
    1. Introduction
    2. Page Formats
    3. Page Boundaries
    4. Compare or Check for a Specific Format
    5. Get the Orientation of a Page
  19. Standard and Public Key Encryption
    1. Introduction
    2. Different Versions and Algorithms
    3. Permissions
    4. Authenticate Against an Existing Security Handler
      1. With User or Owner Password (Standard)
      2. With Certificate and Private Key (Public-key)
    5. Remove a Security Handler
    6. Create Standard Security Handlers
    7. Create Public-Key Security Handlers
    8. Encryption Engine
  20. Fonts and Encodings
    1. Introduction
    2. Fonts
      1. PDF Standard Fonts
      2. TrueType Fonts
    3. Encodings
  21. Corrupted Documents
    1. Introduction
    2. How SetaPDF Handles Corrupted Documents
      1. Corrupted Cross-Reference Table
      2. Invalid File Header
  22. Reader Enabled Documents
    1. Introduction
    2. Check for Usage Rights
    3. Remove Usage Rights
  23. Refactor Old SetaPDF Code
    1. Overview
    2. SetaPDF-LinkReplacer
      1. Introduction
      2. Error Handling
      3. Loading and Saving PDF Documents
      4. Equivalent Code of Methods
        1. setUseUpdate()
        2. getPageCount()
        3. getLinks()
        4. getValue()
        5. setValue()
    3. SetaPDF-MetaManager
      1. Introduction
      2. Error Handling
      3. Loading and Saving PDF Documents
      4. Equivalent Code of Methods
        1. setUseUpdate()
        2. getEncryption()
        3. getPageCount()
        4. getPageData()
        5. setPageData()
        6. getInfoData()
        7. setInfoData()
        8. getDocumentMetadata()
        9. setDocumentMetadata()
        10. getDocumentIds()
    4. SetaPDF-Encryptor
      1. Introduction
      2. Error Handling
      3. Loading and Saving PDF Documents
      4. Equivalent Code of Methods
        1. Permissions
        2. SetaPDF_Encryptor::encrypt()
        3. SetaPDF_Encryptor::setTmpDirectory() / SetaPDF_Encryptor::factory()
  24. API Reference

Miscellaneous

Questions about SetaPDF-Core?

If you are searching for a feature or have any question regarding this or any other product, contact us at support@setasign.com.

Do you like this product?

Then it would be awesome, if you‘d recommend it to your friends!