The destination
parameter specifies where your PDF will be stored when using asynchronous rendering.
Overview
When rendering PDFs asynchronously, the generated file needs to be stored somewhere. The destination
parameter allows you to configure cloud storage details for the rendered PDF.
Parameter details
Configuration for where your PDF will be stored when using asynchronous rendering
The cloud storage provider to use
Available options: aws_s3
, google_cloud_storage
The storage bucket name where the PDF will be stored
Storage path within the bucket, including the filename
Example: pdfs/document.pdf
Authorization requirements
Before using cloud destinations, you must grant Vortex PDF permission to upload files to your cloud storage:
Google Cloud Storage
For Google Cloud Storage, grant access to the service account by:
Navigate to your Google Cloud Console’s IAM & Admin section
Add the following service account: astronaut@vortex-pdf.iam.gserviceaccount.com
Assign the role “Storage Object User” to this service account
AWS S3
For AWS S3, add the following bucket policy to grant access:
{
"Version" : "2012-10-17" ,
"Statement" : [
{
"Effect" : "Allow" ,
"Principal" : {
"AWS" : "arn:aws:iam::015796437331:user/vortex-pdf"
},
"Action" : [
"s3:PutObject" ,
"s3:PutObjectAcl"
],
"Resource" : "arn:aws:s3:::YOUR-BUCKET-NAME/*"
}
]
}
Replace YOUR-BUCKET-NAME
with your actual S3 bucket name.
Usage
{
"parts" : "https://example.com" ,
"destination" : {
"provider" : "aws_s3" ,
"bucket" : "my-pdf-bucket" ,
"path" : "reports/document.pdf"
}
}
Behavior
When you submit an asynchronous rendering request with a destination, the API will:
Accept your request and return immediately with a success status
Process the rendering in the background
Upload the completed PDF to the specified cloud destination
Notify you via webhook (if configured) when the process is complete
Use cases
This parameter is particularly useful for:
Large document generation : When rendering complex or large documents that may take time to process
Background processing : When you want to initiate rendering without waiting for completion
Direct cloud storage : When you want PDFs delivered directly to your cloud storage without intermediary steps
The destination
parameter is often used together with the webhook
parameter, which allows you to receive a notification when the rendering is complete:
{
"parts" : "https://example.com" ,
"destination" : {
"provider" : "aws_s3" ,
"bucket" : "my-pdf-bucket" ,
"path" : "reports/document.pdf"
},
"webhook" : {
"url" : "https://myapp.com/webhooks/pdf-complete" ,
"headers" : {
"Authorization" : "Bearer your-secret-token"
}
}
}
The webhook will receive a POST request with information about the completed rendering, including the status and location of the generated PDF.