Lulu Developer Forums

Troubleshooting: Publication API

RSS Feed

Incorrect dimensions

    • Scribr
    • Topic created 2 years ago

    When creating a new project, I am getting an error indicating my dimensions are not correct for the project I have created. I don't understand why I am getting this error since both uploaded files are 8.5x11 pdfs and match the trim_size selected, "US_LETTER". Pls. Help....

    ERR : Your cover file is 595 points wide by 842 points high, but these are not the right dimensions. Your cover should be uploaded at 1257.3 x 810 points."

    *** ^^^ WHAT DOES THAT MEAN? *****

    My project JSON: { "project_type": "softcover", "bibliography": { "title": "Test Book", "authors": [ { "first_name": "Chris", "last_name": "Simpson" } ], "category": 13, "description": "Test Book description", "language": "EN", "country_code": "US" }, "file_info": { "contents": [ { "mimetype": "application/pdf", "file_id": 26023 } ], "cover": [ { "mimetype": "application/pdf", "file_id": 26025 } ] }, "access": "private", "physical_attributes": { "color": true, "trim_size": "US_LETTER", "binding_type": "perfect", "paper_type": "regular" }, "pricing": [ { "total_price": 24, "product": "print", "currency_code": "USD" } ] }

    Message edited by Scribr 1 year ago

    Tags

  1. Josiah Gore2 years ago

    This is because the cover PDF needs to be large enough to wrap around the book, so it needs to include the front, back, and spine. Therefore the width of the cover is generally twice the width of the trim size plus the size of the spine (which depends on the number of pages in the book).

    You should take a look at the cover size calculation API call for info on how to determine what the size of a particular cover should be.

  2. Scribr2 years ago

    Thanks Josiah. You don't by chance have a simpler way of automatically creating a generic cover? It would have been nice to just upload a single 8.5x11 formatted page and have you guys determine the rest based on some data included with the project manifest. Having to use your conversion api appears to be such a hassle with all the other steps required to automate the book creation process.

    1. So far... I am getting a base cost to determine pricing
    2. Uploading a cover and the content
    3. Creating the project

    and now I have to use the cover conversion API and possibly check status on its completion before continuing to Step #2?

    What is the best approach for us?

    Chris

  3. Josiah Gore2 years ago

    Our cover conversion API is the simplest way to get a cover PDF of the correct dimensions. The flow of calls would look something like this:

    1. Use the cover size calculation call to determine the spine width.
    2. Pass this as an input to the cover conversion call, while choosing an appropriate template and values (title, description, etc) to inject into that template.
    3. Upload the interior PDF.
    4. Create the project, using the output file id of the cover conversion call to use the generated cover.
  4. developer_davidemivo1 year ago

    Thanks for information, very Helpfull, because i have similar problem,

    Regards,

[ Page 1 of 1 ]