Very technical question, but if on the pages of a book you want the image or the lines to extend to the end of the page (the trim) then you need to use something called bleed where you size the document larger than the trim size AND you images or lines extend past the trim size.
Format your PDF manuscript at 0.25” (6 mm) higher and 0.125” (3 mm) wider than your selected trim size in order to print the full bleed area.
There is some discussion about this topic here. One persons suggests it should also be 0.25” (6 mm), that is every edge (top, bottom, left, right) should extend by 0.125” (3 mm). E.g a 6×9 inch book for bleed needs a 6.25 x 9.25 inch file. But that seems to be counter to the official advice of:
If you want your images to bleed to the edges of your pages, extend them 0.125” (3 mm) beyond the normal trim size from the top, bottom, and outer edges for your manuscript, and on all edges for a cover. E.g. 6.125 x 9.25 inch file.
But it could be that having the extension of 0.125” (3 mm) on each edge to make 0.25” (6 mm) overall is just simply to control. E.g. a 6×9 inch book with bleed needs a file 6.25 x 9.25 inches.
And KDP’s Paperback Publishing guidelines are available here.
Also useful to note:
If your book contains lines (i.e., a chart, table or graphic element), give the lines a minimum thickness/weight of 0.75 point or 0.01” (0.3 mm) to ensure they appear in print.
If you‘ve selected black ink & white paper for a book containing gray backgrounds, we recommend a minimum grayscale ll of 10%.