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

blend mode implementation for pdf lets pdfA validation fail #1037

Closed
u-fischer opened this issue Jul 31, 2021 · 0 comments · Fixed by #1038
Closed

blend mode implementation for pdf lets pdfA validation fail #1037

u-fischer opened this issue Jul 31, 2021 · 0 comments · Fixed by #1038

Comments

@u-fischer
Copy link
Contributor

pgfsys-common-pdf.def puts the blend mode in an array:

\def\pgfsys@blend@mode#1{%
  \expandafter\ifx\csname pgf@sys@pdf@bm@#1\endcsname\relax%
    \expandafter\let\expandafter\pgf@temp\csname pgf@sys@pdf@blend@mode@map@#1\endcsname%
    \expandafter\xdef\csname pgf@sys@pdf@bm@#1\endcsname{/pgf@bm\pgf@temp}%
    \ifx\pgf@temp\relax%
      \pgferror{Unknown blend mode '#1'}%
      \def\pgf@temp{Normal}%
    \fi%
    \edef\pgf@temp{/pgf@bm\pgf@temp << /BM [ /\pgf@temp ] >>}%<< %<----------------!!
    \expandafter\pgfutil@addpdfresource@extgs\expandafter{\pgf@temp}%
  \fi%
  \pgfsysprotocol@literal{\csname pgf@sys@pdf@bm@#1\endcsname\space gs}%
}

This will then write for example <</BM [ /Screen] >> into the pdf.

This is allowed, but deprecated in 2.0, the specification says about the /BM value:

name or array (array is deprecated in PDF 2.0)

As shown here https://tex.stackexchange.com/questions/609116/tikz-transparency-and-pdf-a, the verapdf validator seems not to like the array.

I suggest to write only a name by changing the line into

 \edef\pgf@temp{/pgf@bm\pgf@temp << /BM  /\pgf@temp  >>}%<< 
hmenke added a commit to hmenke/pgf that referenced this issue Aug 4, 2021
Co-authored-by: Ulrike Fischer <[email protected]>
Signed-off-by: Henri Menke <[email protected]>
hmenke added a commit to hmenke/pgf that referenced this issue Aug 4, 2021
Co-authored-by: Ulrike Fischer <[email protected]>
Signed-off-by: Henri Menke <[email protected]>
hmenke added a commit to hmenke/pgf that referenced this issue Aug 4, 2021
Co-authored-by: Ulrike Fischer <[email protected]>
Signed-off-by: Henri Menke <[email protected]>
hmenke added a commit that referenced this issue Aug 6, 2021
Blend mode as array is deprecated #1037
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants