apyhub
FILE CONVERSION

Convert Spreadsheets to PDF API

Hosted on ApyHub

What it does

Spreadsheet to PDF converts Excel and spreadsheet files into PDF output you can download or fetch as a signed link. Send a file upload, a remote spreadsheet URL, or base64-encoded file bytes, and get back a PDF in the format you choose.

Use the file endpoints when your app receives an upload, the URL endpoints when you already host the spreadsheet elsewhere, or the base64 endpoints when the source arrives as encoded bytes. For download responses, the API returns binary PDF content. For link responses, it returns a data field containing a URI you can hand off to another service or store for later retrieval.

You can also set landscape on the download variants to render the PDF in landscape orientation. The file upload download endpoint accepts .xls, .xlsx, or .ods, and the file download endpoint can take an output query value if you want to name the generated file.

Spreadsheet to PDF is a fit for reporting workflows, invoice exports, archived financial sheets, or any internal tool that needs a spreadsheet rendered as a shareable PDF without building office-format handling into your own service.

▣ ENDPOINT 01 / 06
POST
Convert spreadsheet upload to PDF signed link
http://localhost:8080/apyhub/convert-spreadsheet-to-pdf/file/link
QUICKSTARTGUIDE

Quickstart

Upload a spreadsheet file to convert it to PDF.

curl -X POST "http://localhost:8080/apyhub/convert-spreadsheet-to-pdf/file/link" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/spreadsheet.xlsx"

What you'll get back

Returns a JSON object with a data string field containing the PDF file URI.

{
  "data": "https://example.com/output.pdf"
}
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*

About this endpoint

What it does

Converts an uploaded spreadsheet file to PDF and returns a signed URL to the generated PDF. The request sends the spreadsheet as a binary file upload, and the response returns the PDF link in a JSON object.

Query Parameter(s)

AttributeTypeMandatoryDescription
landscapeBooleanNoSets the PDF orientation. Default: false.

Request Body

ParameterTypeMandatoryDescription
fileStringYesThe spreadsheet file to convert. Binary upload.

Response

Returns a JSON object with a data string field containing a URI to the generated PDF file.

AttributeTypeMandatoryDescription
dataStringYesSigned URI for the converted PDF file.

Query parameters

Name
Type
Description
landscapeOPTIONAL
boolean
DEFAULT false

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 02 / 06
POST
Convert remote spreadsheet URL to PDF download
http://localhost:8080/apyhub/convert-spreadsheet-to-pdf/url/download
QUICKSTARTGUIDE

Quickstart

Convert a spreadsheet from a URL into a PDF file.

curl -X POST "http://localhost:8080/apyhub/convert-spreadsheet-to-pdf/url/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.xlsx"}'

What you'll get back

Returns a binary file response containing the generated PDF. The output schema is a raw string with binary format, so there is no JSON wrapper or fields to describe.

TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*

About this endpoint

What it does

Converts a spreadsheet available at a remote URL into a PDF and returns the generated file as a binary download. You provide the spreadsheet URL in the request body and can optionally request landscape output with a query parameter.

Query Parameter(s)

AttributeTypeMandatoryDescription
landscapeBooleanNoWhen true, generates the PDF in landscape orientation. Default: false.

Request Body

ParameterTypeMandatoryDescription
urlStringYesRemote spreadsheet URL to convert. Must be a URI.

Response

Returns a binary file download containing the generated PDF. The output schema is a binary string, so there is no JSON response body to document.

Query parameters

Name
Type
Description
landscapeOPTIONAL
boolean
DEFAULT false

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 03 / 06
POST
Convert remote spreadsheet URL to PDF signed link
http://localhost:8080/apyhub/convert-spreadsheet-to-pdf/url/link
QUICKSTARTGUIDE

Quickstart

Convert a spreadsheet from a public URL into a PDF by sending the file link in the request body.

curl -X POST "http://localhost:8080/apyhub/convert-spreadsheet-to-pdf/url/link" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.xlsx"}'

What you'll get back

Returns a JSON object with a data string field containing the URI of the generated PDF.

{
  "data": "https://..."
}
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*

About this endpoint

What it does

Converts a remotely hosted spreadsheet file, provided as a URL, into a PDF and returns a signed PDF link. The request accepts a spreadsheet URL in the body and the response contains the generated PDF URL.

Request Body

ParameterTypeMandatoryDescription
urlStringYesThe remote spreadsheet file URL. Must be a valid URI.

Response

Returns a JSON object with a data string field — a signed URI pointing to the generated PDF file.

ParameterTypeMandatoryDescription
dataStringYesSigned URI of the generated PDF file.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 04 / 06
POST
Convert base64-encoded spreadsheet to PDF download
http://localhost:8080/apyhub/convert-spreadsheet-to-pdf/base64/download
QUICKSTARTGUIDE

Quickstart

Convert a Base64-encoded spreadsheet to PDF and download the result.

curl -X POST "http://localhost:8080/apyhub/convert-spreadsheet-to-pdf/base64/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"base64":"UEsDBBQAAAAIAAeLbVQAAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsDBBQAAAAIAAeLbVQAAAAAAAAAAAAAAAAHAAAAd29ya2Jvb2sueG1sUEsBAhQAFAAAAAgAB4ttVAAAAAAAAAAAAAAAAAAkABAAAAAAAAAAAAAAAAAAAAAE1FVEEtSU5GL/7KAABQSwECFAAUA...",
      "landscape":false}'

What you'll get back

Returns a binary file response containing the generated PDF.

TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Base64-encoded file bytes.

About this endpoint

What it does

Converts a base64-encoded spreadsheet into a PDF file and returns the result as a binary download.

Query Parameter(s)

AttributeTypeMandatoryDescription
landscapeBooleanNoOptional page orientation flag. Default: false.

Request Body

ParameterTypeMandatoryDescription
base64StringYesBase64-encoded file bytes.

Response

Returns a binary file download as the response body. The output schema is a string with binary format, so the success response is the PDF content itself rather than a JSON object.

Query parameters

Name
Type
Description
landscapeOPTIONAL
boolean
DEFAULT false

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 05 / 06
POST
Convert base64-encoded spreadsheet to PDF signed link
http://localhost:8080/apyhub/convert-spreadsheet-to-pdf/base64/link
QUICKSTARTGUIDE

Quickstart

Convert a spreadsheet from a Base64 string into a PDF by sending the encoded file bytes.

curl -X POST "http://localhost:8080/apyhub/convert-spreadsheet-to-pdf/base64/link" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"base64":"UEsDBBQAAAAIAAeLbV..."}'

What you'll get back

Returns a JSON object with a data string field containing a URI to the generated PDF.

{
  "data": "https://example.com/output.pdf"
}
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Base64-encoded file bytes.

About this endpoint

What it does

Converts a base64-encoded spreadsheet file into a PDF and returns a signed link to the generated PDF. Submit the file bytes as base64 in the request body; the response contains a URI to the PDF.

Request Body

ParameterTypeMandatoryDescription
base64StringYesBase64-encoded file bytes.

Response

Returns a JSON object with a data string field formatted as a URI — this is the signed link to the generated PDF. The success response is an object with one top-level field: data (String).

ParameterTypeMandatoryDescription
dataStringYesURI of the generated PDF signed link.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 06 / 06
POST
Convert spreadsheet upload to PDF download
http://localhost:8080/apyhub/convert-spreadsheet-to-pdf/file/download
QUICKSTARTGUIDE

Quickstart

Upload a spreadsheet file to convert it into a PDF download.

curl -X POST "http://localhost:8080/apyhub/convert-spreadsheet-to-pdf/file/download?output=output.pdf" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.xlsx"

What you'll get back

Returns a binary file stream (string with format: binary) containing the generated PDF.

TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
.xls, .xlsx, or .ods

About this endpoint

What it does

Uploads a spreadsheet file and returns a PDF download generated from that file. The request accepts the spreadsheet in the body and optional query parameters that affect the output filename and page orientation.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput filename for the generated PDF. Example: output.pdf.
landscapeBooleanNoPage orientation flag. Default: false.

Request Body

ParameterTypeMandatoryDescription
fileStringYesSpreadsheet file to convert. Binary upload; supported formats: .xls, .xlsx, .ods.

Response

Returns a binary file response containing the generated PDF download. The success response is a single binary payload.

ParameterTypeMandatoryDescription
binaryStringYesPDF file content returned as binary data.

Query parameters

Name
Type
Description
outputOPTIONAL
string
landscapeOPTIONAL
boolean
DEFAULT false

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.