I'm trying to setup a book to print at Blurb.com. I'm preparing the PDF and want to setup the MediaBox, Bleedbox, and TrimBox to confirm that my document is setup correctly for printing. There is an existing question here about the BleedBox, but, the answers do not change the output as reported by pdfinfo and changing multiple boxes is not covered.
Test Script
#!/bin/sh
gs -o output.pdf \
-sDEVICE=pdfwrite \
-r72 \
-dPDFX \
-sProcessColorModel=DeviceCMYK \
-dFIXEDMEDIA \
-dDEVICEWIDTHPOINTS=660 \
-dDEVICEHEIGHTPOINTS=910 \
-c "[/BleedBox [36 36 600 877] /PAGES pdfmark" \
-f test_in.pdf
pdfinfo -f 1 -l 1 -box output.pdf
Output
GPL Ghostscript 9.50 (2019-10-15)
Copyright (C) 2019 Artifex Software, Inc. All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Processing pages 1 through 17.
Page 1
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7
Page 8
Page 9
Page 10
Page 11
Page 12
Page 13
Page 14
Page 15
Page 16
Page 17
Producer: GPL Ghostscript 9.50
CreationDate: Sun Jan 5 15:46:42 2020
ModDate: Sun Jan 5 15:46:42 2020
Tagged: no
Form: none
Pages: 17
Encrypted: no
Page 1 size: 660 x 910 pts (rotated 0 degrees)
Page 1 MediaBox: 0.00 0.00 660.00 910.00
Page 1 CropBox: 0.00 0.00 660.00 910.00
Page 1 BleedBox: 0.00 0.00 660.00 910.00
Page 1 TrimBox: 0.00 0.00 660.00 910.00
Page 1 ArtBox: 0.00 0.00 660.00 910.00
File size: 1213265 bytes
Optimized: no
PDF version: 1.3