Abyssale Developer Hub
  • Getting Started
  • Rest API
    • Overview - Rest API
    • Authentication
    • Designs
      • Design Details
    • Generation
      • Design information
      • Synchronous generation
        • Generate single image
      • Asynchronous generation
        • Generate Multi-Format images
        • Generate Multi-Format PDFs for Printing
        • Generate Multi-Page PDF for Printing
        • Generate Multi-Format Videos
        • Generate Multi-Format Animated GIFs
        • Generate HTML5 Banner Ads
          • ad network
      • Element properties
        • Root
        • Text
        • Button
        • Image
        • Logo
        • Shape
        • Rating
        • Illustration
        • QR Code
        • Video
        • Audio
      • Errors
    • Image Export
    • Fonts
    • Annexes
    • API Reference
  • Dynamic Images
    • Overview - Dynamic Images
    • Dynamic Image generation with URL
  • Webhooks
    • Overview - Webhooks
    • Events
      • Design
      • Banner
      • Global events
Powered by GitBook
On this page
  • Asynchronous Asset Generation Endpoint
  • Generation Characteristics
  • Output File Types
  • Additional information
  • Print design
  • Sample request
  • Sample response
  1. Rest API
  2. Generation
  3. Asynchronous generation

Generate Multi-Format PDFs for Printing

How to generate asynchronously multi-format PDFs for printing

PreviousGenerate Multi-Format imagesNextGenerate Multi-Page PDF for Printing

Last updated 5 months ago

This feature is available from the plan.

Asynchronous Asset Generation Endpoint

POST /async/banner-builder/{design_id}/generate

Generation Characteristics

  • Supported Design Type: Print

  • Response: Asynchronous

  • Enables batch generation of multiple assets

  • Retrieval methods:

    • Webhooks

    • Polling

Output File Types

Supported formats:

  • Single page printable PDF

Additional information

Retrieval Mechanism

  • Initial request returns a generation_request_id

  • You can track generation status and retrieve results using:

    • Webhook notifications

    • Periodic API polling

Key feature

  • Supports bulk asset creation

  • Allows handling of complex or time-consuming generation tasks

  • Provides flexibility in result retrieval

Output customisation

In addition to the supported image properties, a print property can be set to customise the output PDF. Here is the available option:

Display crop marks

  • Default: the value you have in the builder

  • Boolean

Color profile

uuid
description

be2ab219-8fe4-4d85-91ba-65bdc9ddaf01

CMYK - ISO Coated v2 (ECI)

03738f37-5b6f-4be9-9100-706b1711f9dd

CMYK - ISO Coated v2 (ECI) 300%

e0c86a8a-050c-41f1-885a-0f74b9baac50

CMYK - ISO Uncoated

0e0355e6-2931-4c83-92f2-64db9f5ddffc

CMYK - US Web Coated (SWOP 2006 5v2)

db3c123e-1127-11ef-b77e-f93002785645

RGB - No color profile included

fac91df8-1155-11ef-b77e-f93002785645

CMYK - ISO Newspaper26 v4

Configuration Example:

"print": {
 "display_crop_marks": true,
 "color_profile": "e0c86a8a-050c-41f1-885a-0f74b9baac50"
}

Print design

Sample request

Do not forget to replace {YOUR-API-KEY} and {design_id}

curl -X POST -H "x-api-key:{YOUR-API-KEY}" -H "Content-Type: application/json"  \
-d '{
  "template_format_names": [
    "postcard", "tabloid-vertical"
  ],
  "elements": {
    "root": {
      "background_color": "cmyk(0,0,0,0)"
    },
    "text_0": {
      "payload": "Lorem ipsum",
      "color": "cmyka(0,0,0,100,100)",
      "font_size": 24,
      "font": "6156629c-33c5-11ea-9877-92672c1b8195",
      "font_weight": 400,
      "line_height": 130,
      "alignment": "top left",
      "hidden": false
    }
  }
}' \
https://api.abyssale.com/async/banner-builder/{design_id}/generate
const axios = require('axios');

const payload = {
  "template_format_names": [
    "postcard", "tabloid-vertical"
  ],
  "elements": {
    "root": {
      "background_color": "cmyk(0,0,0,0)"
    },
    "text_0": {
      "payload": "Lorem ipsum",
      "color": "cmyka(0,0,0,100,100)",
      "font_size": 24,
      "font": "6156629c-33c5-11ea-9877-92672c1b8195",
      "font_weight": 400,
      "line_height": 130,
      "alignment": "top left",
      "hidden": false
    }
  }
}

axios.post("https://api.abyssale.com/async/banner-builder/{design_id}/generate", payload, {
    headers: {"x-api-key": "{YOUR-API-KEY}", "Content-Type": "application/json", "timeout": 30000}
  }).then(response => {
    console.log(response.data)
})
import json
import requests

image_generation_payload = {
  "template_format_names": [
    "postcard", "tabloid-vertical"
  ],
  "elements": {
    "root": {
      "background_color": "cmyk(0,0,0,0)"
    },
    "text_0": {
      "payload": "Lorem ipsum",
      "color": "cmyka(0,0,0,100,100)",
      "font_size": 24,
      "font": "6156629c-33c5-11ea-9877-92672c1b8195",
      "font_weight": 400,
      "line_height": 130,
      "alignment": "top left",
      "hidden": false
    }
  }
}

r = requests.post("https://api.abyssale.com/async/banner-builder/{design_id}/generate",
  headers={"x-api-key": "YOUR-API-KEY", "Content-Type": "application/json"},
  data=json.dumps(image_generation_payload),
  timeout=30
)
r.json()

Sample response

{"generation_request_id": "166e1852-dc97-43e3-a5f2-142076452c74"}

Prime