Getting Started

​ ​Welcome

Blitline Job

Job Response

Job Options

Functions

Polling and Postbacks

Gotchas

Development Recommendations

Service Limits

Examples List

List of Available Functions

Output Options

S3 Destination

IAM Users

S3 Signed Url

Azure Destination

FTP Destination

Other Service Signed Urls

CDN

Advanced

Metadata

Colorspace

Color Extraction

Static IPs

Signed Jobs

Formats

Pipelines

Image Optimization

Smart Image

PDF

Fonts

Subimage

Special (Non-Image) Processing

AWS Rekognition/Facial Recognition

Apache Tika

Vector Processing

Animated GIFs

Screenshots of Websites

IM Scripts

Video Keyframes

Zipping

​ ​Trancoding Video Presets

​ ​Video Transcoding

Vector Processing

Updated a month ago ​by Blitline Support

BLITLINE VECTOR SUPPORT

You can convert between vector formats without rasterization on Blitline.

You can convert directly from one vector format to another without an intermediate rasterization step. The rasterization formats we support are PDFEPSSVG, and AI.

CONVERT ENDPOINT

You must submit JSON to a different Blitline URL to do vector conversion:

https://api.blitline.com/convert

The JSON submitted to this endpoint is very similar to the “/job” endpoint:

  • application_id : Your secret key which allows us to know who is submitting the data (required: 1 time)
  • postback_url : Triggers postback to given url once image has completed processing (optional: 1 time)
  • src : The location of the source file to be processed (required: 1 time)
  • s3_destination : The bucket and key of the output file. The key extension dictates what conversion will be performed (required: 1 time)


Example:

{
    "application_id": "MY_APP_ID",
    "src": "https://s3.amazonaws.com/img.blitline/ai/Swirls_Circles_Graphic.ai",
    "postback_url": "https://mywebsite.com/blitline_postback_example",
    "s3_destination": {
        "bucket": "my_bucket",
        "key": "my_key/my_new_fancy.svg"
    }
}


HOW DO I SUBMIT THIS JSON?


Any way you want, it’s just an HTTP POST, so you can use any language you’d like. We have a curl example below because it’s the simplest form that everyone can use, but virtually every modern language has a simple way to submit JSON via HTTP Posts.

Curl Example:

curl -X POST -H "Content-Type: application/json" -d '{"application_id": "MY_APP_ID","src": "https://s3.amazonaws.com/img.blitline/ai/Swirls_Circles_Graphic.ai","postback_url": "https://mywebsite.com/blitline_postback_example","s3_destination": {"bucket": "my_bucket","key": "my_key/my_new_fancy.svg"} }' http://api.blitline.com/convert

Resulting Response JSON:

  • results : Container for results of conversion job (required: 1 time)
  • job_id : Job ID of submitted job (your receipt number) (required: 1 time)
  • target_url : Location where final file will be placed (required: 1 time)
  • error : If an error happened, this will be the reason (optional: 1 time)

IS MY JOB DONE? (ANSWER: NO)

Conversion works the same way as all the other Blitline jobs. It’s asynchronously put into a queue and processed rapidly (typically milliseconds), but at the point of submission above, your job IS NOT COMPLETED, it’s just a queue to be completed ‘soon’.

You can tell if you job is done in two ways:

  • If you had a postback_url in your JSON, your server will be contacted shortly, once the job has finished. Read more…
  • You can poll to see if the job has complete (please prefer postbacks over polling).
  • You can assume it will be done successfully and move on


Image To Vector

Experimental Functionality

We can even make some simple conversions from an image to a Vector!

For example, turn a regular image into this:

https://s3.amazonaws.com/web.blitline/pdfs/vector_from_image.pdf

If you want more info about how to do this, feel free to try it out at:

http://api.blitline.com/actions/image_to_vector?application_id=YOUR_APP_ID&src=https://i.ytimg.com/vi/7QNfUE7hBUc/maxresdefault.jpg&extension=pdf


We are always here to help!

If you have any questions, or desire more/alternative functionality please feel free to contact us a support@blitline.com. We are continually updating and improving the Blitline service, and enjoy feedback and interaction with our customers!

Also, if you want to run a ‘convert’ on a vector file, AND rasterize it all in one big job, ask us and we’ll explain how to accomplish this using the regular Blitline API :)


How did we do?