How can I create my own button?

If you sign up, we will get you a button code, like you can see below. Click the button for more.

See the button code

Why does my button show a price?

In the blue okay state, the cloud print button always shows the lowest price available for your publication. If you click the button below, you can order our test publication.

Why is my button in a red error state?

The error state is shown when the button is configured incorrectly.

Oops, error!

The button shows this feedback because it thinks it is misconfigured. On mouse-over, it will tell you what is wrong. Most likely, one of your button variables is configured in a wrong way.

Why is my button in a grey disabled state?

The disabled state is shown only when there is no product available that fits the publication.

Sorry, no print

The button may show this feedback because the aspect ratio is out of our range, or the number of pages is not supported. On mouse-over, the button tells you what is wrong.

What are the variables?

The variables are the pieces of information that you need to add to the button code. We need to know to be able to print your document.

Mandatory variables

  • data-filetype should be either 'pdf' or 'image'. Default is 'pdf'.
  • data-width is a number, equal to the width of the document in millimeters in case of a PDF. In case of filetype image it is the image width in pixels.
  • data-height is a number, equal to the height of the document in millimeters in case of a PDF. In case of filetype image it is the image height in pixels.
  • data-pages is the total number of pages, including the cover pages. In case of filetype image, the number of pages should always be 1.
  • data-src is the permalink to the actual document file. It should be a valid URL that should be available for at least a week after ordering.

Recommended variables

  • data-title is the title of your publication.
  • data-offering is an ID that refers to your own Peecho catalogue. You can use it to force a product choice. It will override our product suggestion.
  • data-thumbnail is valid URL that points to a thumbnail image that describes the document.
  • data-redirect-cancel is a valid URL that points to one of your own pages that contains your message to a visitor who cancels the order during the check-out process.
  • data-redirect-error is a valid URL that points to one of your own pages that contains your own error message in case something goes wrong during the check-out process.
  • data-redirect-thankyou is a valid URL that points to one of your own pages that contains your thank-you message to a visitor who has finished the order.
  • data-currency indicates the currency that should be used.
  • data-locale points to the language that should be used.
  • data-style is a boolean (default "true") that indicates if the default styling of the button is enabled.
  • data-text is a string that replaces the default text on the button.

What kind of files can I print?

Currently, the print button supports PDF and images. Supported image formats are jpeg, gif, png, tiff, bmp, wmf and eps.

How should I lay out my document?

For images, you should take into account aspect ratio, size and resolution (considering the right size, it should be over 150 DPI). For multi-page documents, it's only slightly more complicated. In general: don't worry about bleeds or spine - we will generate that for you.

Hardcover books

The accepted file type is PDF, but there are a few other rules.

  • The first page will be put on the front cover.
  • The second page will be on the first left page in the book!
  • The inside of the back cover will be white. There may be a white page before that if the PDF has an odd number of pages.
  • The last page will be put on the back of the cover.

Glossy

The accepted file type is PDF.

  • The first page will be put on the front cover.
  • The second page will be on the inside of the front cover.
  • The page before the last page will be put on the inside of the back cover (even number of pages in the PDF) or the back cover will be white (odd number of pages in the PDF).
  • The last page will be put on the back of the cover.

What sizes can I print?

The actual size of a document is less important than the ratio of the content. We will never cut your content or change the aspect ratio. However, we might change the total size to make it fit in our offerings. We will always do the fitting downwards if we can, so we will only enlarge a document to fit in a product if your document is smaller than the smallest product we have.

If the document you supply fits within our aspect ratio range, your customer will be offered only products that reflect that aspect ratio correctly.

The rules for bookalikes are are:

  • A publication should have at least 12 pages and at most 500.
  • Its aspect ratio (width/height) should be below 1.54.
  • Its aspect ratio (width/height) should be over 0.34

These rules apply if you do not remove any catalogue items out of your portfolio. If you do, you run the risk that for some publications there will not be any products available.

For single photo products, there is no limitation to aspect ratio - in theory - because posters can be cut to size.

What can I print with a single button?

You can print an unlimited number of documents with a single button, as long as you replace the variables for each document. It is pretty much like a Facebook Like button.

How can I style the button?

You can style the button while keeping price and status information. The default button styles can be switched off by applying this button variable.

data-style="false"

The button will still show price information, but it will not show any styling whatsoever. In that case, you could apply your own CSS rules, based the following HTML structure.


<a class="peecho-btn">
	<span class="peecho-btn-outer">
		<span class="peecho-btn-inner">
			<span class="peecho-btn-text"></span>
			<span class="peecho-icon"></span>
		</span>
	</span>
</a>
						

State CSS classes

In every state of the button, another class is added to the link tag to indicate that state. These are the state classes.

  • peecho-btn-okay
  • peecho-btn-disabled
  • peecho-btn-error

For example, you could hide the disabled button entirely by applying the style:

a.peecho-btn-disabled {display:none;}

Will the button have an API?

Yes, the button has a single call API structure, based on JSONP. By adding the necessary information to the single call, you can skip certain pages in the check-out process. For example, if you add the shipping information to your call, your consumer does not need to go through that page.

We will publish the specifications here as soon as the features are out of beta. For now, please apply for a Premium account if you wish to use an API, rather than our print button.

Advanced

What does the premium API look like?

The premium REST API is highly useful for embedding variable data into pre-defined design templates. Therefore, it is somewhat more complicated.

How does data merge work?

The application that will deal with your design will have to fill the variable data XML with actual data and send it to our API. For each order, we will then merge the variable data with your template and create the right file for each facility. And so on. And so on.

Do you offer open source applications?

Yes, we do.

We offer mature open source applications for sending physical postcards from iPhone and Android devices, a functional PHP SDK and we have a Flex applications available as well.

Eventually, these should be available on code.peecho.com, but if not, just ask us.