Fix calculations for pages with bleeds set
Currently attempting to use pagedjs-cli
to output a page with bleeds makes an almighty mess. This is because
(a) The PDF_SETTINGS
object is used rather than the correct settings
object. This merge request removes the PDF_SETTINGS
object.
(b) Puppeteer's preferCSSPageSize
doesn't work with bleeds, because Chromium doesn't support them. This merge request calculates the page size from the first page in the PDF instead.
(c) The calculations for the CropBox
in the output were all wrong. These are now corrected.
pagedjs-cli
now renders the same as in the browser for all the HTML files I am currently using.