Bug 708042 - CMap issue with LaTeX and ghostscript 10.04.0
Summary: CMap issue with LaTeX and ghostscript 10.04.0
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 10.04.0
Hardware: PC Linux
: P2 normal
Assignee: Default assignee
URL:
Keywords:
: 708201 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-09-19 12:08 UTC by bruno.n.pagani
Modified: 2024-12-19 08:24 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
Original file (1.09 MB, application/pdf)
2024-09-19 12:08 UTC, bruno.n.pagani
Details
File processed with gs10.03.1 (108.59 KB, application/pdf)
2024-09-19 12:09 UTC, bruno.n.pagani
Details
File processed with gs10.04.0 (106.71 KB, application/pdf)
2024-09-19 12:09 UTC, bruno.n.pagani
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bruno.n.pagani 2024-09-19 12:08:46 UTC
Created attachment 26058 [details]
Original file

After updating ghostscript to 10.04.0, I have an issue that looks like https://bugs.ghostscript.com/show_bug.cgi?id=707831.

I am post-processing my (Lua)LaTeX outputs with

gs -o "outputgs.pdf" -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress output.pdf

With gs 10.03.1 I had no issue, but with gs 10.04.0 the processing returns:

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.

As a result, selecting or copying text from the file is broken.

For instance, here is the first title line, normally first and as it is now second:

1 Résolution analytique de la chute en régime turbulent

ࣝ XǑȕȂǶȟȜǦȂǼ ƷǼƷǶΝȜǦȑȟǐ njǐ ǶƷ džǣȟȜǐ ǐǼ ȒǑǝǦǻǐ ȜȟȒDžȟǶǐǼȜ
Comment 1 bruno.n.pagani 2024-09-19 12:09:25 UTC
Created attachment 26059 [details]
File processed with gs10.03.1
Comment 2 bruno.n.pagani 2024-09-19 12:09:45 UTC
Created attachment 26060 [details]
File processed with gs10.04.0
Comment 3 Ken Sharp 2024-09-19 16:27:49 UTC
The ToUnicode CMaps in the file are strange. Every one looks like this:

0 beginbfrange
endbfrange
44 beginbfchar
<0001> <0041>

That is they all start with an empty bfrange, which we reject. It is legal, however. Pointless, but legal, so this commit 	65f6ea3c1660ea05b6a575cbe738e66e54b9a497 relaxes the requirement.
Comment 4 bruno.n.pagani 2024-09-19 19:49:23 UTC
Can confirm this solves the issue, thanks for the quick fix!
Comment 5 Ken Sharp 2024-12-18 17:36:26 UTC
*** Bug 708201 has been marked as a duplicate of this bug. ***
Comment 6 Ken Sharp 2024-12-19 08:24:02 UTC
*** Bug 708201 has been marked as a duplicate of this bug. ***