mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-27 03:36:51 -06:00
check_pdfx4 didn't look at colour spaces, so a placed RGB PNG (or a CMYK TIFF converted to RGB, #35) went into a PDF/X-4 file as DeviceRGB under the CMYK output intent with an empty warnings list. PDF/X-4 lets RGB in only when it is colour-managed: ICCBased, or DeviceRGB remapped by a DefaultRGB colour space. DeviceCMYK and DeviceGray are the intent's own values. The check now reads the file with hayro-syntax and, when the PDF/X output intent's profile has four channels, walks each page: its content, the images, forms (placed PDFs), patterns, shadings and soft masks it uses, and the transparency groups. It reports DeviceRGB (or Indexed over it) images with their object number and pixel size, RGB fills and strokes, RGB gradients, RGB inline images and groups blending in RGB, each with the pages it is on, unless a DefaultRGB is in scope. Like the other PDF/X findings these are export warnings. The separate "some transparency groups still blend in RGB" warning is gone: the group check covers it, with the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>