Created attachment 26295 [details] Test file Consider the following simple `test.tex` source file: \documentclass{article} \begin{document} Foo. \end{document} Compiled with both (up to date TeX Live 2024) `pdflatex`, `xelatex` or `lualatex`, the resulting `test.pdf` is okay. But, if it is compiled with `lualatex` (only) and if the resulting PDF is subject to: gs -P- -dSAFER -q -P- -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr "-sOutputFile=test.pdf.pdf" -P- -dSAFER test.pdf with `gs` (version 10.04.0), the “Foo.” text in `test.pdf.pdf` (joined), if copied and pasted, returns: 6QQX I don't know the PDF internals but this bug has been discussed here: https://tug.org/pipermail/tex-live/2024-December/050985.html and, in this thread, from this post: https://tug.org/pipermail/tex-live/2024-December/050990.html and the following ones, it looks like the mapping is missing in gs 10.04.0 while gs 10.03.1 includes it.
Created attachment 26296 [details] Original test file (uncompressed) before gs is used Added the original test file (uncompressed) before gs is used.
Created attachment 26297 [details] Original test file (uncompressed) after gs is used Replaced the test file by the one obtained from the original one after gs is used.
*** This bug has been marked as a duplicate of bug 708042 ***
(In reply to Ken Sharp from comment #3) > > *** This bug has been marked as a duplicate of bug 708042 *** Could you please explain in what the current bug is a duplicate of bug 708042, and what to do to get rid of this issue? Thanks.
(In reply to Denis Bitouzé from comment #4) > (In reply to Ken Sharp from comment #3) > > > > *** This bug has been marked as a duplicate of bug 708042 *** > > Could you please explain in what the current bug is a duplicate of bug > 708042, and what to do to get rid of this issue? > > Thanks. You failed to give the back channel output: ------------------------------------------------------------------------------ GPL Ghostscript 10.04.0 (2024-09-18) Copyright (C) 2024 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 1. Page 1 The following errors were encountered at least once while processing this file: CMap unrecoverably broken **** This file had errors that were repaired or ignored. **** The file was produced by: **** >>>> LuaTeX-1.18.0 <<<< **** Please notify the author of the software that produced this **** file that it does not conform to Adobe's published PDF **** specification. ------------------------------------------------------------------------------ The input file has an 'unusual' CMap with an empty bfrange, just as described in 708042. ---------------------- 0 beginbfrange endbfrange ---------------------- Remove those two lines and the problem disappears. So clearly the same problem as described in comment #3 of bug #708042. *** This bug has been marked as a duplicate of bug 708042 ***
(In reply to Ken Sharp from comment #5) > (In reply to Denis Bitouzé from comment #4) > > (In reply to Ken Sharp from comment #3) > > > > > > *** This bug has been marked as a duplicate of bug 708042 *** > > > > Could you please explain in what the current bug is a duplicate of bug > > 708042, and what to do to get rid of this issue? > > > > Thanks. > > You failed to give the back channel output: > [...] Sorry, I have no idea what is the back channel output and how to get it.
(In reply to Denis Bitouzé from comment #6) > (In reply to Ken Sharp from comment #5) > > (In reply to Denis Bitouzé from comment #4) > > > (In reply to Ken Sharp from comment #3) > > > > > > > > *** This bug has been marked as a duplicate of bug 708042 *** > > > > > > Could you please explain in what the current bug is a duplicate of bug > > > 708042, and what to do to get rid of this issue? > > > > > > Thanks. > > > > You failed to give the back channel output: > > [...] > > Sorry, I have no idea what is the back channel output and how to get it. When you run Ghostscript, provided you don't do something unhelpful like setting -q or -dQUIET, which suppresses the information, you get helpful information on stdout and stderr. Note your command line binds stdout to stderr so all the output goes to stderr. In passing; your command line uses -q which is (as noted) less than ideal when investigating problems, and also sets -dSAFER twice and -P- three times.
(In reply to Ken Sharp from comment #7) > (In reply to Denis Bitouzé from comment #6) > > (In reply to Ken Sharp from comment #5) > > > (In reply to Denis Bitouzé from comment #4) > > > > (In reply to Ken Sharp from comment #3) > > When you run Ghostscript, provided you don't do something unhelpful like > setting -q or -dQUIET, which suppresses the information, you get helpful > information on stdout and stderr. Note your command line binds stdout to > stderr so all the output goes to stderr. Thanks! > In passing; your command line uses -q which is (as noted) less than ideal > when investigating problems, OK. > and also sets -dSAFER twice and -P- three times. In fact, I first encountered this issue with ps2pdf, which in turn runs ps2pdf14, which in turn runs ps2pdfwr, which in turn runs: exec "$GS_EXECUTABLE" $OPTIONS -q -P- -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr "-sOutputFile=$outfile" $OPTIONS "$infile" where: OPTIONS="-P- -dSAFER", hence the options duplicated.