- Previous: Generating Cover PDFs
- Up: Deprecated Publishing APIs
- Next: Uploading Files
Cover Generation Data Structures
Deprecation Notice
The cover generaion API that uses these data structures is deprecated as of July 19, 2011.
Cover Metadata
Description
Example
This is a sample JSON-formatted Cover object
{
"layoutDefinition" : {
"name" : null,
"coverSizeData" : {
"fullCoverDimension" : null,
"spineWidth" : {
"valueInPoints" : "5.19",
"valueInInches" : "0.07"
},
"spineIndentation" : null
}
},
"layoutBlocks" : {
"frontCoverHeadline" : {
"backgroundColor" : null,
"textColor" : "#000000",
"text" : "A story of intrigue, mystery and misbehavior",
"id" : "frontCoverHeadline"
},
"title" : {
"backgroundColor" : "#229999",
"textColor" : "#000000",
"text" : "Revenge of the Albatross and more stories",
"id" : "title"
},
"author" : {
"backgroundColor" : "#229999",
"textColor" : "#000000",
"text" : "Carl Mabry",
"id" : "author"
},
"spineAuthor" : {
"backgroundColor" : "#C0C0C0",
"textColor" : "#000000",
"text" : "Carl Mabry",
"id" : "spineAuthor"
},
"spineLogo" : {
"imageFile" : "http://cfl.uploads.mrx.ca/ham/images/newser/2009/08/BobYoung5725.jpg",
"id" : "spineLogo"
},
"frontFlapText" : {
"backgroundColor" : "#808080",
"textColor" : "#000000",
"text" : "Lulu (Lulu Enterprises, Inc. and Lulu Press, Inc. are collectively called \"Lulu\") is a company offering diverse publishing and printing services with headquarters at Raleigh, North Carolina, United States. The company is international with staff in 12 countries, and offices in Raleigh, London, Toronto and Bangalore.[1] In addition to printing and publishing services it also offers online order fulfillment. The brand name is derived from the concept of a lulu as an old-fashioned term for a remarkable person, object, or idea. [2] The company's CEO is Red Hat co-founder Bob Young. Authors who publish/print materials and similar works through Lulu retain the copyrights to such materials and similar works. Optional services offered by the company include ISBN assignment, and distribution of books to retailers requesting specific titles (returns are not accepted, which limits distribution to physical bookstores). Electronic distribution is also available. Lulu Enterprises was founded in early 2002. OpenMind Publishing, founded by Bradley Schultz and Paul Elliot, merged its publishing company and staff with Lulu in the latter part of 2002. OpenMind Publishing was a publisher of customized texts for college professors. ",
"id" : "frontFlapText"
},
"backFlapText" : {
"backgroundColor" : "#C0C0C0",
"textColor" : "#000000",
"text" : "Lulu (Lulu Enterprises, Inc. and Lulu Press, Inc. are collectively called \"Lulu\") is a company offering diverse publishing and printing services with headquarters at Raleigh, North Carolina, United States. The company is international with staff in 12 countries, and offices in Raleigh, London, Toronto and Bangalore.[1] In addition to printing and publishing services it also offers online order fulfillment. The brand name is derived from the concept of a lulu as an old-fashioned term for a remarkable person, object, or idea. [2] The company's CEO is Red Hat co-founder Bob Young. Authors who publish/print materials and similar works through Lulu retain the copyrights to such materials and similar works. Optional services offered by the company include ISBN assignment, and distribution of books to retailers requesting specific titles (returns are not accepted, which limits distribution to physical bookstores). Electronic distribution is also available. Lulu Enterprises was founded in early 2002. OpenMind Publishing, founded by Bradley Schultz and Paul Elliot, merged its publishing company and staff with Lulu in the latter part of 2002. OpenMind Publishing was a publisher of customized texts for college professors. ",
"id" : "backFlapText"
},
"authorBio" : {
"backgroundColor" : "#808080",
"textColor" : "#000000",
"text" : "Jackson Rogers is is an internationally renowned author, reporter, and columnist - the recipient of two Pulitzer Prizes and the author of five bestselling books, among them Web Diagnostics and Social Media - From Applications to Zen Programming. He teaches at Harvard University.",
"id" : "authorBio"
},
"backCoverSynopsis" : {
"backgroundColor" : "#C0C0C0",
"textColor" : "#000000",
"text" : "Making Money with iPad Applications belongs in the toolbox of every person interested in the design and development of Web-based software, from the CEO to the programming team. Making Money with iPad Applications explores the building blocks of great Web applications and uses them as basic principles of design so that every project produces inspiring workflows with successful results. Principles include creating only whats necessary, getting users up to speed quickly, and preventing and handling errors. It offers practical advice about how to achieve the qualities of great Web-based applications and consistently and successfully reproduce them.",
"id" : "backCoverSynopsis"
},
"reviewBlurbs" : {
"backgroundColor" : "#808080",
"textColor" : "#000000",
"text" : "\"The perfect way to create extra income in these uncertain economic times\"
- New York Times
\"Clear and concise, this guide is ideal for both beginners and those experts who know the code but need guidance with on and offline marketing .\"
- Wired Magazine
\"There is a very obvious reason why Jackson Rogers is one of America's most celebrated Web authors: he is very good.\"
- CNET",
"id" : "reviewBlurbs"
},
"publisherLogoFront" : {
"imageFile" : "http://cfl.uploads.mrx.ca/ham/images/newser/2009/08/BobYoung5725.jpg",
"id" : "publisherLogoFront"
},
"publisherLogoBack" : {
"imageFile" : "http://cfl.uploads.mrx.ca/ham/images/newser/2009/08/BobYoung5725.jpg",
"id" : "publisherLogoBack"
},
"frontFlapImage" : {
"imageFile" : null,
"id" : "frontFlapImage"
},
"backFlapImage" : {
"imageFile" : "http://cfl.uploads.mrx.ca/ham/images/newser/2009/08/BobYoung5725.jpg",
"id" : "backFlapImage"
},
"authorPhoto" : {
"imageFile" : "http://cfl.uploads.mrx.ca/ham/images/newser/2009/08/BobYoung5725.jpg",
"id" : "authorPhoto"
},
"spineTitle" : {
"backgroundColor" : "#C0C0C0",
"textColor" : "#000000",
"text" : "Revenge of the Albatross\"quote\" and more stories",
"id" : "spineTitle"
},
"backCoverBarCode" : {
"type" : "EAN",
"code" : "9783468111242",
"supplemental" : "54499",
"id" : "ean"
}
},
"backgrounds" : {
"frontCover" : {
"value" : "#996600",
"id" : "frontCoverBackground",
"type" : "ColorCode"
},
"backCover" : {
"value" : "#996600",
"id" : "backCoverBackground",
"type" : "ColorCode"
},
"spine" : null,
"frontFlap" : {
"value" : "#CCB399",
"id" : "frontFlapBackground",
"type" : "ColorCode"
},
"backFlap" : {
"value" : "#CCB399",
"id" : "backFlapBackground",
"type" : "ColorCode"
}
}
}
Fields
| Field | Data Type | Required? | Description |
| layoutDefinition | data structure | yes | Identifies which cover template to use |
| layoutBlocks | data structure | yes | defines the content for each region of the cover template. The list of available regions is defined per template. |
| backgrounds | data structure | no | Defines a customizable background color or image for specific regions of the cover template. |
Layout Definition
Description
The layout definition identifies which cover template to use, and provides cover size dimensions. Lulu only provides predefined cover templates for our most popular POD packages.
Fields
| Field | Data Type | Required? | Description |
| name | string | no | The name of the template to use. See our list of templates. |
| coverSizeData | data structure | yes | The cover dimensions. The correct values for this structure can be retrieved using the One piece cover/spine width calculation API. |
Layout Blocks
Description
There are three kinds of layout blocks: text, image, and barcode. The supported fields are dictated by the layout block you are defining. Please refer to our list of available layout blocks, their type, and the templates that include each block.
Text Blocks
Features
Text for the text blocks can be marked up with supported html tags. The tags must be passed as valid XHTML.
The following tags are supported:
- line break (<br>)
- bold (<b>)
- emphasis (<em>)
- strong (<strong>)
- italic (<i>)
- ordered list (<ol> with <li>)
- unordered list (<ul> with <li>)
- underline (<u>)
- paragraph (<p>)
Limitations
- Fonts and font sizes are defined by the template, and cannot be changed through the API.
- Text overflows are not validated. The character limitations vary by text block and POD package, so the API user is required to check the generated PDF and ensure that all text that was supplied was rendered as desired before uploading via the Publication API.
Fields
| Field | Data Type | Required? | Description |
| backgroundColor | string | No | The color for the background of the current block represented as an HTML color string. Defaults to white if not specified or if the specified color is invalid. |
| textColor | string | No | The color for the text of the current block represented as an HTML color string. Defaults to black if not specified or if the specified color is invalid. |
| text | string | No | The text for the current block. |
| id | string | Yes | The name of the current block as specified in the list of available layout blocks. |
Image Blocks
Limitations
- Image files must be hosted on a publicly accessible server and its location supplied as a valid HTTP URL.
- Image files have a maximum size limitation of 10 MB.
- Image files must be in JPEG, GIF or PNG format. The API will not render images of invalid type.
- Image files must have a minimum DPI of 300 to ensure high quality print resolution. The API does not validate image resolution, but files with lower DPI will generate poor-quality results.
Fields
| Field | Data Type | Required? | Description |
| imageFile | string | Yes | The URL for the image to use as the background of the current block. |
| id | string | Yes | The name of the current block as specified in the list of available layout blocks. |
Barcode Blocks
Fields
| Field |
Data Type |
Required? |
Description |
| type |
string |
Yes |
The type of barcode to render, either "EAN" or "QR_CODE". |
| code | string | Yes | If the type is "EAN", this must be a valid EAN or ISBN value. If the type is "QR_CODE", any value is supported, though usually a web page for the author or publisher is included. |
| supplemental | string | No | The extended value for an "EAN" barcode. This is usually the price of the book. This value is ignored for "QR_CODE" barcodes. |
| id |
string |
Yes |
The name of the current block as specified in the list of available layout blocks. |
Backgrounds
Description
Define a customizable background color or background image for defined regions of the cover template. A background can be a valid HTML color code or an uploaded image file.
The various customizable backgrounds are: frontCover, backCover, frontFlap, backFlap, spine. If a background is not supplied, it will be assigned the default value.
Fields
| Field | Data Type | Required? | Description |
| type | string | Yes | How the background is specified, either "ColorCode" or "Image" |
| value | string | No | If the type is "ColorCode", this must be a valid HTML color code. If the type is "Image", this must be a valid image URL as described under Image Blocks above. If the value is unspecified or is invalid and the type is "ColorCode", the background will default to white. If the value is unspecified or invalid for images, then an error icon will appear in the resulting PDF. |
Book Physical Properties
Description
A description of the physical book.
Example
This is the minimal data required to determine what the physical book dimensions will be.
{
"numberOfPages" : 100,
"color" : false,
"trimSize" : "POCKET",
"bindingType" : "perfect",
"paperType" : "regular"
}
Fields
td>yes| Field | Data Type | Required? | Description |
| numberOfPages | integer | yes | The number of pages in the PDF that will be supplied to the publication API. |
| binding_type | string | yes | The requested book binding type. The available options depend on the project type. Softcover books support: "perfect", "saddle-stitch", and "coil". Hardcover books support: "jacket-hardcover" and "casewrap-hardcover". |
| trim_size | string | yes | The size of the book. See the list of available trim sizes. |
| paper_type | string | yes | The quality of paper to use. The valid paper types are: "premium", "regular", and "publisher-grade". |
| color | boolean | yes | Does the project contain full color pages in the interior of the book. If any page in the book includes color, this must be True. |
Cover Size Data
Description
The exact dimensions for the cover that should be generated for the book. This is required for the Layout Definition block.
Example
"coverSizeData" : {
"fullCoverDimension" :
"width" : {
"valueInPoints" : 646.22,
"valueInInches" : 8.96
},
"height" : {
"valueInPoints" : 513.0,
"valueInInches" : 7.13
}
},
"spineWidth" : {
"valueInPoints" : 16.22,
"valueInInches" : 0.23
},
"spineIndentation" : {
"length" : {
"valueInPoints" : 315.0,
"valueInInches" : 4.38
},
"orientation" : "FROM_LEFT"
}
}
Fields
| Field | Data Type | Required? | Description |
| fullCoverDimension | data structure | Yes | A structure to represent the exact dimensions of the full cover |
| spineWidth | data structure | Yes | The width of the spine portion of the cover in both points and inches. |
| spineIndentation | data structure | Yes | A structure representing the layout of the spine. |
Cover Dimensions
Fields
| Field | Data Type | Required? | Description |
| width | data structure | Yes | A simple structure representing the width of the cover in both points and inches |
| height | data strcuture | Yes | A simple structure representing the height of the cover in both points and inches |
Spine Indentation
Fields
| Field | Data Type | Required? | Description |
| length | data stucture | Yes | The number of points and inches to indent the spine text |
| orientation | string | Yes | How to indent the spine text. |
- Previous: Generating Cover PDFs
- Up: Deprecated Publishing APIs
- Next: Uploading Files


0 Comments
Please sign in to post a comment.