Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plain black text is encoded as RGB instead of Gray and so printing with full-color in paged.js #734

Open
1 task done
geealbers opened this issue May 17, 2023 · 3 comments
Assignees
Labels
bug Actual behavior does not match expected behavior output:pdf An issue with the pdf output status:backlog Issue is a lower priority but needs to eventually be addressed

Comments

@geealbers
Copy link
Member

Before proceeding, check to make sure there isn’t an existing issue for this bug.

  • I have searched the existing issues and determined this is a new bug.

Steps to reproduce

  1. Start a new project
  2. Run quire build and quire pdf to generate a PDF
  3. Open the PDF in Acrobat and use the Print Production > Output Preview tool to hide the Black (K) separation

Actual behavior

The main body text of the PDF (though set as #000 is revealed to be made up of a full-color build of CMYK. Meaning it has a little of each color in it.

It appears that in Paged.js/Chrome the blacks are being encoded as RGB colors and being interpreted as full CMYK builds and so using 4-color inks when it should not. For the PrinceXML handling of this, see https://www.princexml.com/doc/graphics/#rich-black-and-true-black, where they talk of the RGB color being "encoded in the DeviceGray color space"

When the value use-true-black is used, such an RGB value will be encoded in the DeviceGray color space in the PDF. A CMYK printer should print the gray level using only the black ink. This is the default setting of Prince.

Expected behavior

Removing the Black (K) separation with the Print Production > Output Preview tool should make the text dissappear entirely, thus confirming it is only printing with Black ink, and not any of the other colors

Version numbers

Quire CLI 1.0.0-rc.7
Quire 11ty 1.0.0-rc.9
Node 18.16.0

What browsers are you seeing the problem on?

No response

Relevant Terminal/Shell output

No response

Supporting Information

Paged.js without Black ink:

Screen Shot 2023-05-17 at 4 48 22 PM

PrinceXML without Black ink:

Screen Shot 2023-05-17 at 4 48 04 PM
@geealbers geealbers added the status:triage needed Issue needs to be triaged by the Quire team. This label is automatically applied to new issues. label May 17, 2023
@fchasen
Copy link
Collaborator

fchasen commented May 23, 2023

A few option for handling this at the moment:

  • OSP PDFUtils is an open source tool using Ghostscript to do PDF post-processing.
  • Adobe Acrobat: In Preflight Fixup -> Custom Fixups allows creating a color map tol to replace the blacks
  • Pitstop Pro has a more automated conversion

Ideally we'd use Ghostscript.js npm library to include the Ghostscript commands for color processing directly in the Paged.js CLI but I don't think the Ghostscript dual licensing will allow for that, so either we can make it a separate optional plugin or eventually use PDF-lib to parse, converting and replace colors.

@geealbers
Copy link
Member Author

Thanks @fchasen. I'm going to take you off the issue but am reopening it until we can figure out and document a reasonable process for Quire users to convert rick-black to black-only text in their PDFs. My own first attempts through Acrobat were woefully unsuccessful. I'm wondering though if our production department might be able to advise so I will follow up with them as a next step.

@geealbers geealbers reopened this May 26, 2023
@Erin-Cecele Erin-Cecele added status:in progress Issue is under development output:pdf An issue with the pdf output bug Actual behavior does not match expected behavior and removed status:triage needed Issue needs to be triaged by the Quire team. This label is automatically applied to new issues. labels May 30, 2023
@geealbers geealbers self-assigned this May 30, 2023
@Erin-Cecele
Copy link
Collaborator

We are currently working on a fix for your bug! Stay tuned for updates and thank you for your important contribution.

@Erin-Cecele Erin-Cecele added status:backlog Issue is a lower priority but needs to eventually be addressed and removed status:in progress Issue is under development labels Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Actual behavior does not match expected behavior output:pdf An issue with the pdf output status:backlog Issue is a lower priority but needs to eventually be addressed
Projects
None yet
Development

No branches or pull requests

3 participants