Print-ready PDF
Turn a print export into a PDF a print shop accepts: CMYK in the shop's color profile, PDF/X, with crop marks.
You need a design whose template has a print format, such as print-a4-portrait. Create and export a design shows how to make one; here its ID is in POST_ID.
1. Export the print format
curl "https://app.heycreo.io/api/organizations/$ORGANIZATION_ID/posts/$POST_ID/exports" \
-H "Authorization: Bearer $HEYCREO_API_KEY" \
--json '{ "sizes": ["print-a4-portrait"] }' | jq '.[] | {id, status}'
Wait until the export is completed and has a pdfUrl:
curl "https://app.heycreo.io/api/organizations/$ORGANIZATION_ID/posts/$POST_ID/exports" \
-H "Authorization: Bearer $HEYCREO_API_KEY" \
| jq '.[] | select(.templateSizeId == "print-a4-portrait") | {id, status, pdfUrl}'
The next step converts that PDF for print. Keep the export's id:
export EXPORT_ID="…"
2. Start the prepress job
curl "https://app.heycreo.io/api/organizations/$ORGANIZATION_ID/exports/$EXPORT_ID/prepress" \
-H "Authorization: Bearer $HEYCREO_API_KEY" \
--json '{ "profile": "fogra39", "standard": "pdfx-1a", "cropMarks": true }'
{ "status": "queued", "prepressJobId": "…" }
Ask your print shop which profile and standard they want. If they don't say, fogra39 with pdfx-1a is the usual choice for coated paper in Europe.
| Field | Values |
|---|---|
profile | fogra39 (coated paper), fogra51 (coated paper, PSO Coated v3), fogra29 (uncoated paper), us-swop-v2 (North America) |
standard | pdfx-1a (everything converted and flattened; accepted almost everywhere), pdfx-4 (keeps transparency), none |
cropMarks | true adds crop marks outside the trim. |
flattenTransparency | Optional. Defaults to true whenever a PDF/X standard is set. |
If the export has no PDF, or the PDF cannot be converted to the profile, the request returns 400 with the reasons in errors.
3. Download the PDF
Ask for the job's result with the prepressJobId from the response:
export PREPRESS_JOB_ID="…"
curl "https://app.heycreo.io/api/organizations/$ORGANIZATION_ID/exports/$EXPORT_ID/prepress/jobs/$PREPRESS_JOB_ID" \
-H "Authorization: Bearer $HEYCREO_API_KEY"
status is processing, then ready or failed. When it is ready, the response has a downloadUrl to fetch the file from:
curl -L "DOWNLOAD_URL" -o summer-sale-print.pdf
The result is kept for one hour. After that the request returns 404; start a new job if you need the file again.