← blog  /  tools

KDP coloring book size and bleed: check your interior PDF in Python

2026-11-12  ·  19 min read  ·  tools

The trim sizes KDP lists, when a coloring book needs bleed, why the page count doubles and what 300 ppi means. Then a Python check that reads your interior PDF and says where it breaks KDP's published rules.

A coloring book is a PDF of pictures, and KDP wants that PDF exact. The page has to be a trim size KDP lists. A picture that runs to the edge needs bleed. Every picture needs enough pixels. And because each picture sits on its own sheet with a blank back, the book has about twice as many pages as pictures.

On 8 November 2026 we read KDP's help pages on trim size, bleed, margins, images, print options and printing cost. Then we wrote a check in Python and ran it on test books with known faults. This post has what KDP says, the code, and what the code found.

The short version#

  • Size: one of the 16 trim sizes KDP lists for paperbacks, or a custom size 4 to 8.5 in wide and 6 to 11.69 in high. Without bleed, the PDF page is exactly the trim size.
  • Bleed: only if a picture, border or background has to reach the edge of the page. Then every page is 0.125 in wider and 0.25 in higher than the trim: 8.625 x 11.25 in for an 8.5 x 11 in book. One such page puts the whole file on bleed.
  • Pages: at least 24, and KDP rounds the count up to an even number. A picture with a blank back is two pages, so 11 pictures plus a title page and a "this book belongs to" page make exactly 24.
  • Pictures: at least 300 ppi (KDP writes DPI). Under 200 DPI KDP calls it low resolution. At 8.5 x 11 in, 300 ppi is 2,550 x 3,300 pixels.
  • Blank pages: no more than 4 in a row at the start or in the middle, and no more than 10 at the end.
  • Margins, without bleed: ink at least 0.25 in from the top, bottom and outside edges, and at least 0.375 in from the binding edge up to 150 pages (0.5 in from 151).

Trim size: the 16 sizes#

KDP's help page "Set Trim Size, Bleed, and Margins" lists 16 trim sizes for paperbacks on kdp.amazon.com, width x height in inches. It calls 6 x 9 the most common in the U.S.

  • Regular, 5: 5 x 8, 5.06 x 7.81, 5.25 x 8, 5.5 x 8.5 and 6 x 9.
  • Large, 11: 6.14 x 9.21, 6.69 x 9.61, 7 x 10, 7.44 x 9.69, 7.5 x 9.25, 8 x 10, 8.25 x 6, 8.25 x 8.25, 8.5 x 8.5, 8.5 x 11 and 8.27 x 11.69.

A trim is large if it is more than 6.12 in wide or more than 9 in high, and large trims have different printing costs from regular ones. You can also enter a custom size, from 4 to 8.5 in wide and 6 to 11.69 in high.

How many pages you can print depends on the size, the ink and the paper. With black ink the least is 24 pages for every size. The most, for a 6 x 9 in book, is 828 on white paper and 776 on cream. For an 8.5 x 11 in book it is 590 on white and 550 on cream.

Ink and paper#

  • Black ink can be printed on cream, white or groundwood paper, KDP says.
  • Color ink is a separate choice. KDP: choose it "if any images in your book are supposed to print in color".
  • The choice is final. Once a book is published you can't change its ink type between standard color, premium color and black-and-white.
  • Low content. KDP's Low-Content Books page says that group does not typically include activity books such as puzzle books or coloring books. The same page says low-content books are not eligible for the free KDP ISBN.

Bleed#

Bleed is ink that runs past the edge of the page, so that no white border shows after the page is trimmed. KDP trims 0.125 in (3.2 mm) from the top, bottom and outside edges. So a page with bleed is larger than the trim:

KDP page size with bleed, in inchestext
page width  = trim width  + 0.125
page height = trim height + 0.25

The width grows by 0.125 in because only the outside edge is trimmed. The height grows by 0.25 in because the top and the bottom both are. KDP's own example: a 6 x 9 in book is set up as 6.125 x 9.25 in. For 8.5 x 11 in its table gives 8.625 x 11.25 in.

That table has 17 rows, and one is off. 16 follow the formula exactly. For 5.5 x 8.5 in it says 5.626 x 8.75 in, where the formula gives 5.625 x 8.75 in. Use the formula.

Do you need bleed? KDP says every cover does, but an interior only if you want images, backgrounds or illustrations to reach the edge of the page. Even one such page puts the whole file on bleed. A line drawing that stops before the margin reaches no edge, so it needs none. A full-page border or a gray background does. KDP adds two things: a file with bleed must be a PDF, and the bleed setting does not change the printing cost. With bleed, the outside margins grow from 0.25 in to 0.375 in.

Why the page count doubles#

KDP counts every side of a sheet as a page: "every page has a front and back side, equaling two pages". A coloring book gives each picture its own sheet and leaves the back blank. Our tool's page says why: so markers do not bleed through onto the next picture.

  • The minimum is 24 pages. KDP counts them from the file and rounds up to an even number.
  • The two sample books on our tool's page have two front pages, a title page and a "this book belongs to" page, then two pages for each picture. Cozy Cats has 12 pictures and 26 pages, Farm Friends has 11 and 24. With that layout 11 pictures is the least that reaches 24. Ten make 22.
  • Pictures sit on right-hand pages. KDP puts odd page numbers on the right, so page 1, and every picture page in that layout, is a right-hand page.
  • Blank pages in a row are limited. KDP allows no more than 4 at the beginning or in the middle and 10 at the end, and lists "excessive blank pages" among the common reasons a file fails. A picture, a blank back and a picture never make more than one in a row. A block of spare pages can.
  • Blank backs add no printing cost up to page 110. KDP says a black ink paperback of 24 to 110 pages only incurs the fixed cost: on Amazon.com 2.30 USD for a regular trim and 2.84 USD for a large one, with no cost per page. Past 110 pages a cost per page is added. A book of 50 pictures in the layout above is 102 pages.

Pictures: how many pixels#

KDP asks for every image at a minimum of 300 DPI, and calls anything under 200 DPI low resolution. It sets no maximum, but recommends at most 600 DPI to keep the file under its 650 MB limit.

For a picture in a PDF, DPI means pixels per inch. KDP's own method is to divide the number of pixels by the printed size. A full-page picture at 300 ppi is 2,550 x 3,300 pixels on 8.5 x 11 in and 1,800 x 2,700 on 6 x 9 in. At 1,275 x 1,650 pixels on 8.5 x 11 in it is only 150 ppi.

Two more rules from KDP bear on line art. Transparent objects and layers must be flattened: an image with a transparent background shows up in the PDF as a mask, and check() below reports it. Lines must be at least 0.75 point, or 0.01 in (0.3 mm), thick, which is 3 pixels at 300 ppi. The check does not measure line weight.

Margins#

KDP's minimum margins for top, bottom and outside are 0.25 in without bleed and 0.375 in with bleed. The inside margin, the gutter, grows with the page count:

  • 24 to 150 pages: 0.375 in
  • 151 to 300: 0.5 in
  • 301 to 500: 0.625 in
  • 501 to 700: 0.75 in
  • 701 to 828: 0.875 in

With one picture on every right-hand page, the inside edge is the left edge of every picture page. A coloring book crosses 150 pages at 75 pictures: 74 pictures and two front pages are 150 pages and need 0.375 in, 75 pictures are 152 pages and need 0.5 in. KDP's Print Previewer, which checks your file when you upload it, looks at margins, cover size and fonts, among other things.

The check#

check() reads a PDF with three of poppler's tools (pdfinfo, pdfimages and pdftoppm) and nothing else outside the standard library. It gives a one-line summary and a list of problems:

  • the page size, against the 16 trim sizes with and without bleed, or a custom size within KDP's limits;
  • the page count: at least 24, at most what the size and paper allow, and even;
  • the resolution of every picture, and any transparency;
  • blank pages in a row, and sheets that have ink on both sides;
  • without bleed, how close the ink comes to each edge.

A page with under 2% ink counts as blank, so a small strip for testing colors on a back, like the one in our test books, passes.

KDP coloring book interior checkpython
import os, re, subprocess, tempfile
from itertools import groupby

BLEED = (0.125, 0.25)         # a page with bleed is the trim this much wider and higher
MIN_PAGES, BLANK = 24, 0.02   # pages in a paperback; a page with under 2% ink counts as blank
CUSTOM = ((4, 8.5), (6, 11.69))                       # custom trim: width and height limits in inches
GUTTER = ((150, 0.375), (300, 0.5), (500, 0.625), (700, 0.75), (828, 0.875))   # up to this many pages: inside margin
TRIMS = {       # KDP trim sizes (width, height): most pages with black ink on (white paper, cream paper)
    (5, 8): (828, 776), (5.06, 7.81): (828, 776), (5.25, 8): (828, 776), (5.5, 8.5): (828, 776), (6, 9): (828, 776),
    (6.14, 9.21): (828, 776), (6.69, 9.61): (828, 776), (7, 10): (828, 776), (7.44, 9.69): (828, 776),
    (7.5, 9.25): (828, 776), (8, 10): (828, 776), (8.25, 6): (800, 750), (8.25, 8.25): (800, 750),
    (8.27, 11.69): (780, 730), (8.5, 8.5): (590, 550), (8.5, 11): (590, 550),
}
DARK = bytes(int(v < 200) for v in range(256))        # 1 where a gray value counts as ink

def run(*cmd):
    return subprocess.run(cmd, capture_output=True, text=True, check=True).stdout

def inside_margin(pages):
    return next(inches for most, inches in GUTTER if pages <= most)

def fit(w, h):
    """((trim width, height), with bleed?) if a page w x h inches is a KDP trim, or one plus bleed, else (None, False)."""
    for (tw, th) in TRIMS:
        for bleed, (dw, dh) in ((False, (0, 0)), (True, BLEED)):
            if abs(w - tw - dw) < 0.01 and abs(h - th - dh) < 0.01:
                return (tw, th), bleed
    return None, False

def gaps(gray, w, h, ppi):
    """(share of the page that is ink, inches from the ink to the left, right, top and bottom edge) for 8-bit gray pixels."""
    ink = gray.translate(DARK)
    rows = [ink[i * w:(i + 1) * w] for i in range(h)]
    used = [i for i, r in enumerate(rows) if 1 in r]
    if not used:
        return 0.0, None
    left = min(r.find(1) for r in rows if 1 in r)
    right = min(w - 1 - r.rfind(1) for r in rows if 1 in r)
    return ink.count(1) / len(ink), (left / ppi, right / ppi, used[0] / ppi, (h - 1 - used[-1]) / ppi)

def ink(pdf, dpi=72):
    """gaps() for every page, from poppler's gray rendering of it."""
    with tempfile.TemporaryDirectory() as tmp:
        run("pdftoppm", "-r", str(dpi), "-gray", pdf, tmp + "/p")
        out = []
        for name in sorted(os.listdir(tmp)):
            data = open(os.path.join(tmp, name), "rb").read()
            head = re.match(rb"P5\s+(\d+)\s+(\d+)\s+255\s", data)
            out.append(gaps(data[head.end():], int(head[1]), int(head[2]), dpi))
    return out

def check(pdf, paper="white"):
    """(summary, problems) for a coloring book interior: size, page count, picture resolution, blank backs, margins."""
    sizes = [(float(a) / 72, float(b) / 72) for a, b in
             re.findall(r"Page\s+\d+ size:\s+([\d.]+) x ([\d.]+) pts", run("pdfinfo", "-f", "1", "-l", "99999", pdf))]
    n, (w, h), problems = len(sizes), sizes[0], []
    trim, bleed = fit(w, h)
    custom = trim is None and CUSTOM[0][0] <= w <= CUSTOM[0][1] and CUSTOM[1][0] <= h <= CUSTOM[1][1]
    if len({(round(a, 2), round(b, 2)) for a, b in sizes}) > 1:
        problems.append("the pages are not all the same size")
    if trim is None and not custom:
        problems.append(f"{w:.3f} x {h:.3f} in is no KDP trim size, with or without bleed")
    if n < MIN_PAGES:
        problems.append(f"{n} pages; KDP's minimum is {MIN_PAGES}")
    if trim and n > TRIMS[trim][paper == "cream"]:
        problems.append(f"{n} pages; the most KDP allows at this size on {paper} paper is {TRIMS[trim][paper == 'cream']}")
    if n % 2:
        problems.append(f"{n} pages is odd; KDP rounds it up to an even number")
    low, soft = {}, set()
    for line in run("pdfimages", "-list", pdf).splitlines()[2:]:
        f = line.split()                    # page num type width height color comp bpc enc interp object ID x-ppi y-ppi ...
        if f[2] == "image":
            low[int(f[0])] = min(low.get(int(f[0]), 9999), int(f[12]), int(f[13]))
        else:
            soft.add(int(f[0]))             # a mask or a soft mask: transparency
    thin = sorted(p for p, ppi in low.items() if ppi < 300)
    if thin:
        problems.append(f"{len(thin)} pages hold a picture under 300 ppi, lowest {min(low[p] for p in thin)} ppi "
                        f"(pages {', '.join(map(str, thin[:5]))}{' ...' if len(thin) > 5 else ''}); under 200 is low resolution")
    if soft:
        problems.append(f"transparency on pages {', '.join(map(str, sorted(soft)[:5]))}: flatten the file")
    pages = ink(pdf)
    blank = [share < BLANK for share, _ in pages]
    for is_blank, run_ in groupby(enumerate(blank, 1), key=lambda t: t[1]):
        run_ = [p for p, _ in run_]
        limit = 10 if run_[-1] == n else 4
        if is_blank and len(run_) > limit:
            problems.append(f"{len(run_)} blank pages in a row from page {run_[0]}; KDP allows {limit} there")
    both = [p for p in range(1, n, 2) if not blank[p - 1] and not blank[p]]     # a sheet is page p (front) and p + 1 (back)
    if both:
        problems.append(f"ink on both sides of the sheet at pages {', '.join(f'{p}/{p + 1}' for p in both[:5])}"
                        f"{' ...' if len(both) > 5 else ''}")
    if not bleed:                           # art meant to bleed reaches the edge, so only a book without bleed is measured
        hits = {}
        for p, (share, g) in enumerate(pages, 1):
            if g is None:
                continue
            need = [0.25, 0.25, 0.25, 0.25]
            need[0 if p % 2 else 1] = inside_margin(n)      # page 1 is a right-hand page: its inside edge is the left one
            for side, gap, req in zip(("left", "right", "top", "bottom"), g, need):
                if gap < req - 0.015:                       # 0.015 in is a little more than one pixel at 72 dpi
                    hits.setdefault((side, req), []).append((gap, p))
        for (side, req), found in hits.items():
            problems.append(f"ink within {min(found)[0]:.2f} in of the {side} edge on {len(found)} pages "
                            f"(from page {found[0][1]}); KDP needs {req} in")
    shape = ("no KDP trim size" if not custom else "a custom size") if trim is None else \
            f"trim {trim[0]} x {trim[1]} in {'with' if bleed else 'without'} bleed"
    lowest = min(low.values()) if low else None
    return f"{n} pages, {w:.3f} x {h:.3f} in ({shape}), lowest picture {lowest} ppi, {blank.count(False)} pages with ink", problems

We made the test books with Pillow and reportlab, so every size, margin and resolution is known. The good one is 8.5 x 11 in and 26 pages like the sample books: a title page, a "this book belongs to" page and 12 pictures, each on a right-hand page, with a back that holds only a small outlined strip. The others change one thing at a time.

Run it on the test bookspython
for name in ("good", "bleed", "wide-bleed", "short", "lowres", "alpha", "gutter", "both-sides", "blanks", "odd"):
    summary, problems = check(name + ".pdf")
    print(f"{name}: {summary}")
    for problem in problems:
        print("   ", problem)
for paper in ("white", "cream"):
    print(f"552 pages, {paper} paper:", check("long.pdf", paper)[1] or "no problems")
print("inside margin at 150, 151 pages and with 74, 75 designs:",
      [inside_margin(p) for p in (150, 151, 2 + 2 * 74, 2 + 2 * 75)])
share, g = ink("good.pdf")[2]
print(f"page 3 of good.pdf: {share:.1%} ink, gaps left, right, top, bottom {[round(v, 2) for v in g]} in")

On 8 November 2026 the lines for the good book and for the book with the art too near the edges were:

Output, two of the ten bookstext
good: 26 pages, 8.500 x 11.000 in (trim 8.5 x 11 in without bleed), lowest picture 300 ppi, 12 pages with ink
gutter: 26 pages, 8.500 x 11.000 in (trim 8.5 x 11 in without bleed), lowest picture 300 ppi, 12 pages with ink
    ink within 0.29 in of the left edge on 12 pages (from page 3); KDP needs 0.375 in
    ink within 0.18 in of the right edge on 12 pages (from page 3); KDP needs 0.25 in

The good book passed with no problems. So did the same book at 8.625 x 11.25 in, which the check reads as 8.5 x 11 in with bleed. It does not measure margins on a book with bleed, because art that bleeds is meant to reach the edge.

Seven traps, each one tried#

  1. Bleed added to both sides of the width. Adding 0.125 in to each side gives 8.75 x 11.25 in. KDP's width is the trim plus 0.125 in once. The check says 8.750 x 11.250 in is no KDP trim size, with or without bleed.
  2. Too few pages. Ten pictures made 22 pages: 22 pages; KDP's minimum is 24.
  3. Too few pixels. Three pictures at 150 ppi were found on pages 5, 11 and 19. Changing the DPI number in a file does not help: KDP says that doing it on your computer "may display a higher DPI reading but will not actually increase the quality". The check works from pixels and printed size.
  4. A transparent background. Two pictures with one gave transparency on pages 9, 15: flatten the file.
  5. Ink too near the edge. With the art 0.3 in from the left and 0.2 in from the right, all 12 picture pages were reported: 0.29 in on the left where 0.375 in is needed, and 0.18 in on the right where 0.25 in is needed. A pixel at 72 dpi is 0.014 in wide, so the readings run a little under what we drew.
  6. A picture on a back. One back with a picture gave ink on both sides of the sheet at pages 11/12. That is the case the blank back is there to avoid.
  7. Too many blank pages. Four spare blank pages after a back made five in a row: 5 blank pages in a row from page 14; KDP allows 4 there.

Three more readings. A book of 27 pages gave 27 pages is odd; KDP rounds it up to an even number. A book of 552 pages (275 pictures) at 8.5 x 11 in passed on white paper, where it may have 590, and failed on cream, where it may have 550. And on page 3 of the good book we had drawn the art 0.9, 0.6, 0.7 and 0.8 in from the left, right, top and bottom edges; the check measured 0.9, 0.58, 0.69 and 0.78 in.

What it does not see#

KDP also wants all fonts embedded, and files without crop marks, trim marks, bookmarks, comments, invisible objects, annotations or metadata. This check looks at none of that, nor at line weight. It is not Amazon's approval either. KDP's own Print Previewer checks the file when you upload it, and KDP checks the interior and the cover by hand after you submit.

Without the code#

Our KDP coloring book maker makes the interior and the cover for you. You give it a title and either a theme or your own list of pictures, 11 to 50 of them, for adults or for kids. You pick a trim size (8.5 x 11, 8 x 10, 7 x 10 or 6 x 9 in, all four on KDP's list above) and white or cream paper. It is paid per design, and the price is on its page.

You download one ZIP and upload two files from it:

  • interior.pdf: a title page, a "this book belongs to" page, then every design on its own right-hand page. Its back is blank except a small strip for testing colors.
  • cover.pdf: back, spine and front on one page, with 0.125 in bleed. The front shows two of the book's designs colored in, or the first one as drawn.

The ZIP also holds check-report.pdf, listing.txt (title, subtitle, description, seven keyword ideas and the print options to pick), six preview images and README.txt with the upload steps. The report is our own check of both files against KDP's paperback specs: page size, page count, embedded fonts, margins and gutter, line weight, blank pages, image resolution, cover size, spine and barcode area. It is signed, and its verify page says it is our check, not an approval from Amazon.

The pictures are drawn by an AI image model. The page says so, and says to answer yes for the images when KDP asks about AI-generated content.

The cover has its own sizes, and a spine that depends on the page count. See KDP cover size and spine width.

written