Zyphur API Documentation

website·Indexed 30 days ago

https://docs.zyphur.me

A PDF rendering and tools API providing capabilities to merge, split, compress, optimize, protect, and repair PDF files. It includes advanced rendering features such as layout control, style parameters, OCR for structured information extraction, and support for digital signatures and logos.

Tokens
8.7K
Snippets
68
Records
100
Agent score
47%

What's inside Zyphur

  1. Edit, compress, and protect PDF documents via API

    Zyphur offers a fast API for PDF manipulation tasks, including merging (joining), splitting, compressing, adding watermarks, and password protection.
  2. Convert HTML or URLs to high-fidelity PDF

    Zyphur provides a service to convert any URL or raw HTML code into a high-fidelity PDF document. The rendering process preserves original styles, typography, and layout.
  3. Extract text and perform OCR on documents

    Zyphur allows for the extraction of native text from PDFs or the use of an OCR (Optical Character Recognition) engine to recover structured information from images or scanned documents.
  4. Manage and edit PDF documents via API

    Zyphur offers a fast API for common PDF editing tasks, including merging, splitting, compressing, adding watermarks, and password protection.
  5. Extract text and perform OCR on documents

    Zyphur supports the extraction of native text from PDFs and utilizes an OCR (Optical Character Recognition) engine to recover structured information from images or scanned documents.
  6. Convert HTML or URLs to PDF

    Zyphur provides a service to convert any URL or raw HTML code into a high-fidelity PDF document. The rendering process preserves original styles, typography, and layout.
  7. Merge multiple PDF files using the Zyphur API

    The Merge PDFs endpoint allows you to combine two or more PDF files quickly. To use this endpoint, you must provide an API key for authorization and send the request as multipart/form-data.
    POST /merge
    Authorization: Bearer YOUR_API_KEY
    Content-Type: multipart/form-data
  8. Extract specific pages from a PDF

    Use the Split PDF tool to extract specific pages or page ranges from a PDF document. Page indexing starts at 1. If a requested page exceeds the total number of pages in the document, the API will return an error (e.g., 'El documento solo tiene 4 páginas. Solicitaste la página 7.').
    POST /split
    Content-Type: multipart/form-data
    Authorization: Bearer YOUR_API_KEY
    
    -- Form Data --
    file: [Binary PDF File]
    pages: '1,3,5-7,10' 
    store: true
  9. Optimize a PDF file via API

    The PDF Optimization tool uses an internal pipeline to process files: first, qpdf repairs and rebuilds the PDF structure; second, Ghostscript compresses images based on the selected quality preset; finally, qpdf linearizes the file to enable 'Fast Web View' for progressive loading.
  10. Extract specific pages from a PDF

    Extract specific pages or ranges from a PDF file using the Split PDF tool. The pages parameter accepts a 1-based index and supports flexible ranges. Examples of valid page strings include '1,3,5' (individual pages), '2-6' (a range), or '1,3,5-7,10' (a mix of both). If a requested page index exceeds the total number of pages in the document, the API will return an error (e.g., 'El documento solo tiene 4 páginas. Solicitaste la página 7.').
    POST /split-pdf
    Content-Type: multipart/form-data
    Authorization: Bearer YOUR_API_KEY
    
    --Form-Data--
    file: [Binary PDF File]
    pages: "1,3,5-7,10"
    store: true
  11. Optimize a PDF file via API

    The PDF Optimization API allows you to compress and repair PDF files using a pipeline that includes structure reconstruction (via qpdf), image reduction (via Ghostscript), and linearization for Fast Web View.

    Request Requirements

    All requests must include the following headers:

    • Authorization: Bearer YOUR_API_KEY
    • Content-Type: multipart/form-data

    Parameters

    • file (Required): The PDF file to be optimized.
    • quality (Required): A string defining the compression level. Options include:
      • screen: Maximum compression, lowest quality.
      • ebook: Balanced compression (Recommended).
      • printer: High quality.
      • prepress: Maximum quality.
    • store (Optional): Boolean flag to determine if the file should be stored.
    POST /optimize
    Authorization: Bearer YOUR_API_KEY
    Content-Type: multipart/form-data
    
    --boundary
    Content-Disposition: form-data; name="file"; filename="document.pdf"
    [Binary Data]
    --boundary
    Content-Disposition: form-data; name="quality"
    ebook
    --boundary
    Content-Disposition: form-data; name="store"
    true
    --boundary--