Enhance PDFs
Enhance PDFs via VIESUS Cloud. Analysis phase, enhancement parameters, DPI limits by subscription tier, and webhook events.
PDF enhancement works differently from image enhancement. Before any enhancement can be triggered, the PDF must go through an analysis phase that identifies all embedded images and calculates the credit cost. Analysis starts automatically after upload.
Wait for analysis
Query the upload to check analysis progress:
query {
upload(id: "your-upload-id") {
id
subStatus
metadata
}
}Analysis status values
subStatus
Meaning
Action
METADATA_ANALYZING
Analysis in progress
Wait or use a webhook
METADATA_ANALYZED_SUCCESSFULLY
Ready for enhancement
Proceed to the next step
METADATA_ANALYZED_FAILED
Analysis failed
Retry with analyzePdf mutation
Analysis results
When analysis succeeds, the metadata field contains:
Total image count in the PDF
Number of images eligible for color enhancement
Number of images eligible for resizing/upscaling
Estimated credit cost for different enhancement combinations
Review the credit estimate before triggering enhancement — especially for large PDFs.
Re-trigger analysis (on failure)
mutation {
analyzePdf(uploadId: "your-upload-id") {
success
}
}Expected response when the re-analysis request is successfully queued:
{ "success": true }If analysis fails repeatedly after multiple re-analysis attempts, this may indicate file format incompatibility, corrupted document content, or system processing limitations. Contact VIESUS technical support with your upload ID and file details for further investigation.
Enhance the PDF
Once subStatus is METADATA_ANALYZED_SUCCESSFULLY:
mutation {
createEnhancedImage(
uploadId: "your-upload-id"
input: {
targetResolution: 300
upscalingThreshold: 1.2
}
) {
id
status
fullUrl
filename
viesusDuration
}
}Parameters for PDF enhancement
targetResolution
Decimal
Target output DPI for embedded images
upscalingThreshold
Decimal
Minimum scale factor required before upscaling is applied to an image; 1.2 = only upscale images that need more than 20% enlargement
customColorConfig
CustomColorConfigInput
Manual color adjustments
Upscaling limits by subscription
PDF enhancement output resolution is capped by subscription tier:
Free
300 DPI
Basic
600 DPI
Business
1,200 DPI
Webhook events for PDFs
Rather than polling, use webhooks to receive push notifications for both events:
Analysis complete — upload.sub_status_update:
{
"id": "eventId",
"event": "upload.sub_status_update",
"data": {
"id": "uploadId",
"status": "UPLOAD_FINISHED",
"subStatus": "METADATA_ANALYZED_SUCCESSFULLY",
"metadata": {
"statistics": {},
"totalCredits": 78
}
},
"created": "2025-05-15T14:12:37.501Z"
}Enhancement complete — same event structure with status: FINISHED on the enhancedImage.
See Webhooks for setup and signature verification.
End-to-end Node.js example
Last updated
Was this helpful?
