Rebuild a book's PDF
generate_pdfBuild or rebuild the printable PDF for a book from its current page images, or for a paperback cover from its current sides. Call it once a cover is IMAGES_READY to get the cover's print PDF, and again after fit_cover_to_kdp or regenerate_image on it. Needed after regenerate_image: regenerating a page replaces that page's image but does NOT rebuild the PDF, so the download stays stale until this runs. Regenerate every page you want to fix first, wait for get_job_status to show IMAGES_READY, then call this once: it is refused while a page is still being redrawn. Poll get_job_status with the same jobId for the new pdfUrl. Costs no credits.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"jobId": "<jobId>"
},
"name": "generate_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobId | Yes | The jobId of the book to rebuild, as returned by a book creation tool or get_job_status. | |
| storyFontSizePoints | No | Story coloring books only, and only when the person asked for a different text size: rebuild with the story text at this size in points, kept for later rebuilds. null goes back to the size chosen by the reader's age. Leave it out to keep the book's current size. Works on a finished book too. |