apyhub
FILE CONVERSION

Convert Word to PDF API

Hosted on ApyHub

What it does

Word to PDF Converter turns a Word document into a PDF from a file upload, a base64-encoded document, or a remote document URL. You can get the result as a downloadable PDF or as a signed link.

Use it when you need to standardize document output for sharing, archiving, or downstream automation. The service accepts .doc, .docx, .odt, and .rtf uploads on the file-based endpoints, plus base64 input on the encoded endpoints and a url for remote documents. Some download endpoints also accept a landscape boolean query parameter to render the PDF in landscape orientation.

The response depends on the endpoint you call. Download endpoints return the PDF as binary output. Link endpoints return an object with a data field containing a URI to the generated PDF.

This fits workflows such as converting customer-submitted Word files into consistent PDFs before storage, or generating a temporary download link for a document fetched from external storage.

▣ ENDPOINT 01 / 06
POST
submit base64: download file
http://localhost:8080/apyhub/convert-word-to-pdf/base64/link
QUICKSTARTGUIDE

Quickstart

Upload a Base64-encoded file and get back a PDF download link.

curl -X POST "http://localhost:8080/apyhub/convert-word-to-pdf/base64/link" \
  -H "apy-token: $APY_TOKEN" \
  -d '{ 
    "base64":"JVBERi0xLjQKJcfs..."
}'

What you'll get back

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

{
  "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 Word document into a PDF and returns a signed link to the generated PDF. The request sends the file bytes as a base64 string, and the response contains the resulting PDF URL.

Request Body

ParameterTypeMandatoryDescription
base64StringYesBase64-encoded file bytes.

Response

Returns a JSON object with a data string field containing a URI to the generated PDF. Success responses are represented by a 200-level response with this object shape.

ParameterTypeMandatoryDescription
dataStringYesURI of the signed link to the generated PDF.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 06
POST
Upload file: download file
http://localhost:8080/apyhub/convert-word-to-pdf/file/download
QUICKSTARTGUIDE

Quickstart

Upload a Word document to convert it to PDF.

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

What you'll get back

Returns a binary file - the converted PDF document.

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*
.doc, .docx, .odt, or .rtf

About this endpoint

What it does

Converts an uploaded Word document to a PDF and returns the generated PDF as a binary response. The request sends the source file in the body and can optionally control the output filename and page orientation via query parameters.

Query Parameter(s)

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

Request Body

ParameterTypeMandatoryDescription
fileStringYesUploaded document file in binary form. Supported formats: .doc, .docx, .odt, or .rtf.

Response

Returns a binary file response containing the converted PDF.

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.

▣ ENDPOINT 03 / 06
POST
upload file: generated url
http://localhost:8080/apyhub/convert-word-to-pdf/file/link
QUICKSTARTGUIDE

Quickstart

Upload a Word file to convert it into a PDF.

curl -X POST "http://localhost:8080/apyhub/convert-word-to-pdf/file/link?landscape=false" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/document.docx"

What you'll get back

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

{
  "data": "https://example.com/file.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 Word document to a PDF and returns a signed link to the generated PDF. The request sends the source file, and the response returns the resulting PDF URL as a string.

Query Parameter(s)

AttributeTypeMandatoryDescription
landscapeBooleanNoOptional page orientation flag. Default: false.

Request Body

ParameterTypeMandatoryDescription
fileStringYesWord document file to convert. Format: binary.

Response

Returns a JSON object with a data string field containing a URI to the generated PDF signed link. Success response: 200.

ParameterTypeMandatoryDescription
dataStringYesSigned link to the converted PDF. Format: URI.

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 04 / 06
POST
submit url : download file
http://localhost:8080/apyhub/convert-word-to-pdf/url/download
QUICKSTARTGUIDE

Quickstart

Convert a Word document from a public URL into a PDF. The url goes in the JSON body, and the optional landscape flag is sent as a query parameter if you need it.

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

What you'll get back

Returns a binary file response — the converted PDF content.

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 remote Word document at the provided URL into a PDF and returns the PDF as a binary download. You can also request landscape output through an optional query parameter.

Query Parameter(s)

AttributeTypeMandatoryDescription
landscapeBooleanNoSet to true to generate the PDF in landscape orientation. Default: false.

Request Body

ParameterTypeMandatoryDescription
urlStringYesThe remote Word document URL to convert. Must be a valid URI.

Response

Returns a binary PDF download.

Query parameters

Name
Type
Description
landscapeOPTIONAL
boolean
DEFAULT false

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 05 / 06
POST
submit url: generated url
http://localhost:8080/apyhub/convert-word-to-pdf/url/link
QUICKSTARTGUIDE

Quickstart

Convert a Word document from a URL into a PDF by sending the document link in the request body.

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

What you'll get back

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

{
  "data": "https://assets.apyhub.com/files/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*

About this endpoint

What it does

Converts a remote Word document available at a URL into a PDF and returns a signed PDF link. The request accepts the source document URL in the body, and the response returns the resulting PDF URL as a string.

Request Body

ParameterTypeMandatoryDescription
urlStringYesRemote Word document URL to convert. Must be a valid URI.

Response

Returns a JSON object with a data string field — a signed PDF URL returned after conversion.

ParameterTypeMandatoryDescription
dataStringYesSigned PDF URL. Must be a valid URI.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 06 / 06
POST
submit base64: download file
http://localhost:8080/apyhub/convert-word-to-pdf/base64/download
QUICKSTARTGUIDE

Quickstart

Convert a Word file provided as base64 into a downloadable PDF.

curl -X POST "http://localhost:8080/apyhub/convert-word-to-pdf/base64/download" \
  -H "apy-token: $APY_TOKEN" \
  -d '{
    "base64": "JVBERi0xLjQKJ..."
  }'

What you'll get back

Returns a binary file response, which is the generated PDF content.

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 Word document to a PDF and returns the PDF as a binary download. The request sends the document content in the body and can optionally request landscape output via a query parameter.

Query Parameter(s)

AttributeTypeMandatoryDescription
landscapeBooleanNoSet to true to generate the PDF in landscape orientation. Default: false.

Request Body

ParameterTypeMandatoryDescription
base64StringYesBase64-encoded file bytes.

Response

Returns a binary string representing the generated PDF file.

ParameterTypeMandatoryDescription
binaryStringYesThe PDF file content returned as binary data.

Query parameters

Name
Type
Description
landscapeOPTIONAL
boolean
DEFAULT false

Body

Name
Type
Description
bodyREQUIRED
object
▣ 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.