[pdftex] Broken PDF output from WEB and CWEB input

Andreas Scherer andreas_tex at freenet.de
Sun Feb 14 11:39:48 CET 2021


Hello, Ross,

> You are wanting valid PDF/A output, right?
No, that's not the goal at all.  I just want to create a library of PDF 
documents from a subset of the C/WEB sources in TeX Live.  And these PDF 
files should be useful on as many platforms as TL itself is installed.

I'm developing on K/Ubuntu 20.04 with TL 2020 (tex+dvipdfm, pdftex, and 
xetex) and use KDE's 'Okular' to view the PDF files.  Apparently, this 
tool is quite lax on the input, because it showed the PDF files as 
expected and intended all along, i.e., with active links in 'blue'.

My secondary machine is a Mac Mini 2014 with 'Catalina 10.15.7'.  A few 
days ago, I updated 'Adobe Acrobat Reader DC' to the most recent version 
2021.001.20135 and experienced the catastrophic issue reported.  (I'm 
not quite sure if I ever opened any of the C/WEB PDF's created with 
'pdftex' with earlier versions of Acrobat Reader before.  I _did_, 
however, run 'make fullmanual' on the CWEB sources and converted the DVI 
files to PDF with 'dvipdfm' on MacOS and viewed these with AR.)

It really was a blast to see the whole Mac system crash and burn (and 
eventually reboot of its own accord), just because _I_ -- as the 
programmer of the 'pwebmac.tex' and 'pdfctwimac.tex' macros -- made a 
simple mistake in an innocent '\pdfliteral'.  Missing '\space's made the 
otherwise complete RGB color 'blue' come out as '0 0 1rg 0 0 1RG'.  As 
said above, 'Okular' grokked this as expected, 'MuPDF' (on Android) 
cropped the pages at the first such misstatement, and 'AR DC' simply 
died hard, taking MacOS down.  It's quite astonishing to see such a 
simple vector of attack on a commercial OS in full action.

> This format didn't exist when pdfTeX was designed and developed,
> but that doesn't mean it cannot be achieved using appropriate macros.
As Karl suggests in private communication, I'll stop further attempts to 
integrate ICC color profiles in any of the C/WEB macros.

> l've been doing it for years, using the  pdfx  LaTeX package,
> which relies on features in  hyperref and some other packages.
> (Indeed I'm now producing fully tagged PDF/UA and PDF/A-3a documents.)
Indeed, four years ago I was working in a team that developed 
'accessible PDF documents', mostly from 'Microsoft Word' and 'Adobe 
InDesign' with a set of external tools to fix all the infelicities that 
those 'word processors' chose to declare as PDF/A.  Using 'Pandoc/LaTeX' 
myself, at that time I became aware of -- but certainly not familiar 
with -- your work on the LaTeX side of the publishing world.

> Hope this helps.
It sure does.  I hope to _use_ your fine work in the future.

To conclude, I'm glad to have caught and fixed the 'color problem' in 
_my_ variants of the pdfTeX macros now.  It really could have caused 
trouble if the defective PDF's would have gone 'live' on a much broader 
audience.

Best regards,
Andreas


More information about the pdftex mailing list.