How to Convert TIFF to PDF with cURL
Follow this cURL walkthrough to convert TIFF to PDF with the Convert to PDF API Tool. Along the way, you'll learn which parts are ordinary cURL syntax, which fields are needed to convert TIFF to PDF, and what to expect from the API response.
Why Convert TIFF to PDF with cURL?
Scanning, fax, medical-record, and document-imaging systems often produce TIFF files even when collaboration and case-management systems expect PDF. Converting at intake creates a consistent document type for the rest of the workflow.
For example, a records service can receive a multi-page TIFF from a scanner, submit it with cURL, and store the resulting PDF beside documents received from office applications. Later steps can apply OCR, merge pages, or add security without maintaining a TIFF-specific branch.
TIFF files may contain one image or many pages. The conversion preserves the source sequence in the generated PDF, while OCR remains a separate operation when the scanned text also needs to become searchable.
cURL Code Example
# By default, we use the US-based API service. This is the primary endpoint for global use. API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work # API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ -F "file=@/path/to/input.tif" \ -F "output=pdfrest_tiff_to_pdf"
Source for Convert TIFF to PDF: View the cURL sample on GitHub. The repository's generic Convert to PDF scaffold is configured here with a .tif input for this tutorial.
Breaking Down the Code
Choose the pdfRest service region
# By default, we use the US-based API service. This is the primary endpoint for global use. API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work # API_URL="https://eu-api.pdfrest.com"
The TIFF example centralizes regional routing in API_URL, with the global US service active and the EU service documented below it. Use the chosen hostname for the entire scan-processing sequence.
Build the authenticated multipart request
curl -X POST "$API_URL/pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
The POST sends TIFF content to the common Convert to PDF endpoint as multipart form data. The response-format and authentication headers remain separate from the uploaded scan, making each part of the call visible.
Upload the input file data
-F "file=@/path/to/input.tif" \
The Convert TIFF to PDF request reads the local source from the path after @ and sends its bytes in the multipart file field. For Convert TIFF to PDF, cURL treats the path as an upload rather than ordinary form text.
Set the operation-specific fields
-F "output=pdfrest_tiff_to_pdf"
The requested output name helps identify the PDF created from the TIFF scan. The .tif upload name supplies the input-format signal and can represent either a single image or a multi-page source.
Read the generated resource response
curl -X POST "$API_URL/pdf" \
When TIFF processing succeeds, pdfRest reports the generated PDF resource in JSON. Preserve its identifier and download details so page review, OCR, or document assembly can continue before retention expires.
Beyond the Tutorial
You have now seen how a compact cURL command can normalize TIFF input into a PDF resource for downstream document workflows.
Validate page count, order, orientation, and readability with realistic TIFF files because scanner settings can vary widely in resolution, compression, and color model.
Continue exploring the Convert TIFF to PDF workflow in API Lab. For the complete Convert TIFF to PDF request contract, accepted values, defaults, and limitations, consult the Convert to PDF API Tool documentation.
Note: The Convert TIFF to PDF example above uploads a file with multipart form data. For source content already stored in pdfRest, the Convert TIFF to PDF JSON payload example shows the resource-ID request shape.