- Previous: Uploading Files
- Up: Deprecated Publishing APIs
- Next: E-Commerce APIs
One-piece cover/spine width calculation API
One-piece cover/spine width calculation API
This API is deprecated as of August 31, 2011. Please use the new cover calculation API instead.
This API does not adhere to our standard API conventions. Notably, it supports only JSON.
Purpose
Calculate the exact size required for the cover and spine width for the book you are generating the cover for. This must be done on a book by book basis, as the exact number of pages in the book will dictate the exact spine width.
Note: This API call is intended primarily for discovering the width of the spine of a book and how that affects the total cover size. As such it will only work with binding types that have a spine (perfect, jacket-hardcover, casewrap-hardcover). Other types of books should have a cover PDF with a height equal to that of the trim size, and a width twice the width of the trim size.
GET Arguments
- api_key -- Your api key for the Publication API.
POST Arguments
- data -- A JSON representation of the physical properties of the book.
Endpoint
https://apps.lulu.com/api/pdfgen/covers/v1/calculateSize/?api_key=XXX
JSON Response
A JSON structure representing the exact cover dimensions. If the call is successful, then the status field will be 200.
{
"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"
}
},
"details" : null,
"status" : 200
}
Errors
If there is an error while processing the cover size request, the same structure is returned, but the status will be 500 and the coverSizeData will be null. For example, if your request is for a trimSize, bindingType, and paperType that cannot be combined in our system, the following error will be returned.
{
"coverSizeData" : null,
"details" : "Lulu has no print plan that meets these requirements.",
"status" : 500
}
- Previous: Uploading Files
- Up: Deprecated Publishing APIs
- Next: E-Commerce APIs


0 Comments
Please sign in to post a comment.