PDF Generation

PDF manipulation is a crucial functionality provided by FastPDF — it allows the conversion, merging, splitting, compression, metadata editing and other transformations of PDF files suitable for various use-cases. On this page, we'll examine the wide array of PDF transformation endpoints that you can use to manipulate PDFs programmatically. We will cover how to perform different transformations, such as converting from and to PDF, merging and splitting PDFs, and much more.


POST/v1/render/barcode

Generate PDF Barcodes

This endpoint allows you to render a barcode PDF based on the provided data and barcode format.

Required attributes

  • Name
    data
    Type
    String
    Description

    The data to encode in the barcode.

  • Name
    barcode_format
    Type
    String
    Description

    The format of the barcode. Default is code128.

    Available barcode formats: qr, codabar, code128, code39, ean, ean13, ean13-guard, ean14, ean8, ean8-guard, gs1, gs1_128, gtin, isbn, isbn10, isbn13, issn, itf, jan, nw-7, pzn, upc, upca, pdf417, ean5, datamatrix, postnet, msi.

Optional attributes

Request

POST
/v1/render/barcode
curl -X POST https://data.fastpdfservice.com/v1/render/barcode \
  -H "Authorization: {token}" \
  -d 'render_data={"data":"1234567890", "barcode_format":"code128"}' \
  -d 'render_options={render_options_json}'


POST/v1/pdf/image/{format}

PDF to Image

This endpoint allows you to convert a PDF file to an image.

Required attributes

  • Name
    file
    Type
    File
    Description

    The path to the PDF file to be converted, or the PDF bytes.

  • Name
    format
    Type
    String
    Description

    The format of the output image. Must be one of the supported formats.

Request

POST
/v1/pdf/image/{format}
curl -X POST https://data.fastpdfservice.com/v1/pdf/image/{format} \
  -H "Authorization: {token}" \
  -F "file=@path/to/your.pdf"

POST/v1/pdf/url

URL to PDF

This endpoint allows you to convert a web page to a PDF file.

Required attributes

  • Name
    url
    Type
    String
    Description

    URL of the web page to convert.

Request

POST
/v1/pdf/url
curl -X POST https://data.fastpdfservice.com/v1/pdf/url \
  -H "Authorization: {token}" \
  -d 'url=https://www.example.com'