Probo Reseller API icon

Probo Reseller API

(0 reviews)

Print Files

1. How to supply files for an order request?

You can supply the following file types:

  • PDF (supports multipage)
  • JPG
  • PNG

There are 2 types of files you can send to us to be printed on the product you are ordering:

  • File which exists of "1 page". This is a PDF with 1 page, JPG or PNG.
  • File which exists of 1 or more pages. This is a PDF with 1 or more pages.

As per documentation you send 1 or more file objects in a "files" array which is attached to the product you are ordering. The examples below will show a simplified version of the product and the files array. The objects within the files array will be called "file object" from here on.

2. Upload a single (page) file

If you want to upload one file, the files array contains a single file object. For example:

{
  "files": [
    {
      "uri": "http://link.to/yourfile.jpg"
    }  
  ]
}

In this case you have a single-sided product with quantity 1. The selected file will be printed on the item.

2.1 Default properties of a file object

The reason why the previous example only contains the uri, is because there are some defaults in place. The following example contains all defaults written out to clarify which properties you can set on a file object:

{
  "files": [
    {
      "uri": "http://link.to/yourfile.jpg",
      "page": 1,
      "side": "front",
      "amount": 1,
      "rotation": 0,
      "fill": true,
      "tiling": "none",
      "mirror": false
    }  
  ]
}

2.2 File properties

uri (required)

The full url to the file, must have public access.

Note: this property will be renamed to url later in time, no worries, this property will still work in the future for backwards compatibility.

page

Select a page from a multipage PDF to be printed. See 3. Upload a multi-page file. The default is 1. For a JPG or PNG you don't have to set this property or just set 1.

side

For single-sided products this is always "front". For double-side products you can add a "back" side to be printed. See 4. Upload files for a double-sided product. The default is "front".

amount

If you want to print the file multiple times, you can set the amount. Total amount should not exceed the quantity you chose for the product. The default is 1.

rotation

If you want to print the file rotated, you can select degrees, choosing between 0, 90, 180 (upside down), 270. The default is 0.

fill

If your image is smaller or bigger than the selected dimensions of the product, you can choose to fill the image up or down to the dimensions of the product. The default is true, so it will be scaled to fit dimensions. Choose false to disable auto scaling.

tiling

If your selected dimensions of the product exceed the maximum dimensions of a material, the print must be printed on multiple "tiles" which will result in equally sized parts. You can chose to tile it vertically or horizontally. Default is "none", which means it will not be tiled and may result in a not accepted order.

mirror

If you want to print the file mirrored. Default is false.

3. Upload a multi-page file

The minimal example to upload a multi-page file is the same as the example in 2. Upload a single file:

{
  "files": [
    {
      "uri": "http://link.to/your-multi-page-file.pdf"
    }  
  ]
}

But this just means, print page 1 of this file and that is probably not of much use. Probably what you want to print is all pages or a set of pages. The following example shows how to print page 2 and 4 of a multi-page file:

{
  "files": [
    {
      "uri": "http://link.to/your-multi-page-file.pdf",
      "pages": [
        {
          "page": 2
        },
        {
          "page": 4
        }
      ]
    }
  ]
}

This will result in 2 files, so in this case you need to have a product amount of 2. Which will print an item with page 2 and an item with page 4 of the single-sided product.

3.1 Default properties of a page object

As noted in 2.1 Default properties of a file object, a page object also has defaults in place, they are actually the same properties, except for the uri, which is already defined on the same level of the pages array.

The following example contains all defaults written out to clarify which properties you can set on a page object, the descriptions can be found in 2.2 File properties:

{
  "files": [
    {
      "uri": "http://link.to/your-multi-page-file.pdf",
      "pages": [
        {
          "page": 2,
          "side": "front",
          "amount": 1,
          "rotation": 0,
          "fill": true,
          "tiling": "none",
          "mirror": false
        },
        {
          "page": 4,
          "side": "front",
          "amount": 1,
          "rotation": 0,
          "fill": true,
          "tiling": "none",
          "mirror": false
        }
      ]
    }
  ]
}

As you can see you can set all the properties on multi-page pages that can also be set on a single page file. See 2.2 File properties for the property descriptions.

4. Upload files for a double-sided product

If you have single paged files (pdf with 1 page, jpg, png) and you want to print a double sided product, a minimal example would be:

{
  "files": [
    {
      "uri": "http://link.to/front.jpg",
      "side": "front"
    },
    {
      "uri": "http://link.to/back.jpg",
      "side": "back"
    }
  ]
}

In this case you have a product with quantity 1, with a "front" and a "back" side with 2 different files. The front.jpg which will be printed on 1 side and the back.jpg will be printed on the other side. It is also possible to print the same file on both sides, just define the uri twice. The example looks like this:

{
  "files": [
    {
      "uri": "http://link.to/both-sides.jpg",
      "side": "front"
    },
    {
      "uri": "http://link.to/both-sides.jpg",
      "side": "back"
    }
  ]
}

This will print the same file on both sides. It is not necessary to add side: front in the first object, as it is the default value, but for readability it is documented in the example. We advise that you always add the side property for readability.

4.1 Print double-sided files multiple times

In case you want to print 1 double sided product 10 times. A restaurant menu for example. Then you can structure the files array like this:

{
  "files": [
    {
      "uri": "http://link.to/menu.jpg",
      "side": "front",
      "amount": 10
    },
    {
      "uri": "http://link.to/logo.jpg",
      "side": "back",
      "amount": 10
    }
  ]
}

If your product has quantity 10, this example will print the menu.jpg on one side and logo.jpg on the other side 10 times.

The amount of the "front" and "back" side need to correspond with each other. In this case both are 10. Also the total amount needs to equal the product quantity you have selected, in this case 10.

Note: because you supply amount 10 for both "front" and "back", this will not result in 20, because "front" and "back" are part of the same single final product, a restaurant menu.

4.2 Upload a multi-page PDF to print double-sided

There are useful use cases to use a multi-page for a double-sided print. For example if you need to print the odd pages as front, and even pages as back, a example would be:

{
  "files": [
    {
      "uri": "http://link.to/multi-page.pdf",
      "pages": [
        {
          "page": 1,
          "side": "front"
        },
        {
          "page": 2,
          "side": "back"
        },
        {
          "page": 3,
          "side": "front"
        },
        {
          "page": 4,
          "side": "back"
        }
      ]
    }
  ]
}

This will print 2 items. 1 item with page 1 and page 2 as sides, the other item with page 3 and 4 as sides.

Note: again the "front" and "back" sides should correspond in amount.


Reviews