LMTX generates PDFs with non-working fonts on real printers
![](https://secure.gravatar.com/avatar/6e692faf04b51988f266a31864bc1efe.jpg?s=120&d=mm&r=g)
Hi,
I use LuaMetaTeX 2.10 20220918 + ConTeXt LMTX 2022.09.11.
Here's a tiny test document, I disabled PDF compression but it also
doesn't work with the default settings.
\setupbackend[level=0,compresslevel=0]
\starttext
Just a line of text.
\stoptext
When I print this "directly" (i.e. sending the raw PDF to the printer)
on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page.
The PDFs render fine on every PDF reader I could find.
Conversion to PostScript with pstopdf (poppler-22.07.0) and then
sending the PS renders the document correctly on the printer.
PDFs generated directly from Context MKIV from TeXLive 2022 using
LuaTeX 1.5 render fine on these printers.
I've also printed PDFs from pdfTeX in the past fine.
I attached the non-working 'foo.pdf.mkix'
and the working 'foo.pdf.mkiv' file.
I tried to disable font subsetting to debug this further, but I
couldn't figure out how to do it.
Any ideas what I should try to help debug this?
cu,
--
Leah Neukirchen
![](https://secure.gravatar.com/avatar/6e692faf04b51988f266a31864bc1efe.jpg?s=120&d=mm&r=g)
Leah Neukirchen via ntg-context
Hi,
I use LuaMetaTeX 2.10 20220918 + ConTeXt LMTX 2022.09.11.
Here's a tiny test document, I disabled PDF compression but it also doesn't work with the default settings.
\setupbackend[level=0,compresslevel=0] \starttext Just a line of text. \stoptext
When I print this "directly" (i.e. sending the raw PDF to the printer) on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page.
The PDFs render fine on every PDF reader I could find.
On Acrobat DC on macOS, there is a visible difference between the two files:
Note that the 'a' and 'l' look quite different.
But I couldn't reproduce it with MuPDF for example.
--
Leah Neukirchen
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 10/3/22 20:57, Leah Neukirchen via ntg-context wrote:
[...] \setupbackend[level=0,compresslevel=0] \starttext Just a line of text. \stoptext [...]
On Acrobat DC on macOS, there is a visible difference between the two files:
Hi Leah, this issue also happens with PDF.js included in Firefox. TeX Gyre Heros is even clearer with dubious hinting. It has been already reported (https://bugzilla.mozilla.org/show_bug.cgi?id=1781022). But even with variable fonts from Adobe (https://github.com/adobe-fonts/source-code-pro/releases/latest), Acrobat has issues with the following code: \definefontfeature [book] [axis={weight=600}] \definefontfamily [mainface] [rm] [SourceCodeVariable] [features={book,none}] \setupbodyfont[mainface, 100pt] \starttext \startTEXpage[offset=1em] AefKkQrt4 \stopTEXpage \stoptext It happens both with LuaMetaTeX and LuaTeX. When playing with certain levels of zooming, some blank spots are displayed inside the characters (printing is fine). BTW, as Hans explained (https://mailman.ntg.nl/pipermail/ntg-context/2022/106840.html), the following top line avoids your printing issue (by setting LuaTeX as the engine, instead of LuaMetaTeX): % engine=luatex Just in case it might help, Pablo
![](https://secure.gravatar.com/avatar/ed6f43113e3f1cee031ebd13654fc703.jpg?s=120&d=mm&r=g)
On 10/5/2022 6:02 PM, Pablo Rodriguez via ntg-context wrote:
It happens both with LuaMetaTeX and LuaTeX. When playing with certain levels of zooming, some blank spots are displayed inside the characters (printing is fine).
Such artifacts can result from operating in the extremes and one has to keep in mind that maybe not all variables fonts have all characters tested for these extremes. Actually even regular fonts can have such effects like small bumps (we saw some in math fonts) and these also show up in font editors. But normally we don't see these at small sizes. Some has to do with 'sloppy or difficult or challenging' designs, some with (eo)fill side effects not much different from what mp graphics can do with envelopes (we've written about that). I'd not loose sleep over this. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 10/3/2022 7:17 PM, Leah Neukirchen via ntg-context wrote:
Hi,
I use LuaMetaTeX 2.10 20220918 + ConTeXt LMTX 2022.09.11.
Here's a tiny test document, I disabled PDF compression but it also doesn't work with the default settings.
\setupbackend[level=0,compresslevel=0] \starttext Just a line of text. \stoptext
When I print this "directly" (i.e. sending the raw PDF to the printer) on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page.
The PDFs render fine on every PDF reader I could find.
Conversion to PostScript with pstopdf (poppler-22.07.0) and then sending the PS renders the document correctly on the printer.
PDFs generated directly from Context MKIV from TeXLive 2022 using LuaTeX 1.5 render fine on these printers. I've also printed PDFs from pdfTeX in the past fine.
I attached the non-working 'foo.pdf.mkix' and the working 'foo.pdf.mkiv' file.
I tried to disable font subsetting to debug this further, but I couldn't figure out how to do it.
subsetting should not be a problem and both files are subsetted (lmxt a bit different but not fundamentally)
Any ideas what I should try to help debug this? i'm clueless ...
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/6e692faf04b51988f266a31864bc1efe.jpg?s=120&d=mm&r=g)
Hans Hagen via ntg-context
On 10/3/2022 7:17 PM, Leah Neukirchen via ntg-context wrote:
Hi, I use LuaMetaTeX 2.10 20220918 + ConTeXt LMTX 2022.09.11. Here's a tiny test document, I disabled PDF compression but it also doesn't work with the default settings. \setupbackend[level=0,compresslevel=0] \starttext Just a line of text. \stoptext When I print this "directly" (i.e. sending the raw PDF to the printer) on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page. The PDFs render fine on every PDF reader I could find. Conversion to PostScript with pstopdf (poppler-22.07.0) and then sending the PS renders the document correctly on the printer. PDFs generated directly from Context MKIV from TeXLive 2022 using LuaTeX 1.5 render fine on these printers. I've also printed PDFs from pdfTeX in the past fine. I attached the non-working 'foo.pdf.mkix' and the working 'foo.pdf.mkiv' file. I tried to disable font subsetting to debug this further, but I couldn't figure out how to do it.
subsetting should not be a problem and both files are subsetted (lmxt a bit different but not fundamentally)
Well the idea was to have the same font stream in both files, so we
exclude that from the reasons it breaks.
Curiously, when I use Deja Vu:
\setupbodyfont[dejavu]
Then I get a
VHOYGZ+DejaVuSansMono CID TrueType Identity-H
yes yes yes 8 0
and the PDF prints fine! So it must be related to how Type 0C fonts
are written out, I think.
--
Leah Neukirchen
![](https://secure.gravatar.com/avatar/a3a76177277476240dee1967f4b9a616.jpg?s=120&d=mm&r=g)
On Mon, Oct 03, 2022 at 07:17:10PM +0200, Leah Neukirchen via ntg-context wrote:
When I print this "directly" (i.e. sending the raw PDF to the printer) on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page.
I believe that is the exact same problem I have and that I described a few days ago in my email with subject "Missing letters and numbers in printout". I have some grids on my document, which gets printed out, but nothing else does.
The PDFs render fine on every PDF reader I could find.
Same here.
PDFs generated directly from Context MKIV from TeXLive 2022 using LuaTeX 1.5 render fine on these printers. I've also printed PDFs from pdfTeX in the past fine.
Same here.
Any ideas what I should try to help debug this?
I was told that this is the default now, that isn't going to change, and that I could always use LuaTeX instead. I could also use LaTeX, I guess, but I'd rather keep using ConTeXt at least while my old 32 bits OpenBSD installation works. Cheers, Ángel
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 10/4/2022 4:16 AM, Angel M Alganza via ntg-context wrote:
On Mon, Oct 03, 2022 at 07:17:10PM +0200, Leah Neukirchen via ntg-context wrote:
When I print this "directly" (i.e. sending the raw PDF to the printer) on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page.
I believe that is the exact same problem I have and that I described a few days ago in my email with subject "Missing letters and numbers in printout". I have some grids on my document, which gets printed out, but nothing else does.
The PDFs render fine on every PDF reader I could find.
Same here.
PDFs generated directly from Context MKIV from TeXLive 2022 using LuaTeX 1.5 render fine on these printers. I've also printed PDFs from pdfTeX in the past fine.
Same here.
Any ideas what I should try to help debug this?
I was told that this is the default now, that isn't going to change, and that I could always use LuaTeX instead. I could also use LaTeX, I guess, but I'd rather keep using ConTeXt at least while my old 32 bits OpenBSD installation works. what happens if you include the lmtx pdf in a mkiv document as image
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/6e692faf04b51988f266a31864bc1efe.jpg?s=120&d=mm&r=g)
Hans Hagen via ntg-context
On 10/4/2022 4:16 AM, Angel M Alganza via ntg-context wrote:
On Mon, Oct 03, 2022 at 07:17:10PM +0200, Leah Neukirchen via ntg-context wrote:
When I print this "directly" (i.e. sending the raw PDF to the printer) on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page. I believe that is the exact same problem I have and that I described a few days ago in my email with subject "Missing letters and numbers in printout". I have some grids on my document, which gets printed out, but nothing else does.
Another data point: Brother B205 doesn't print it either. But would all of these use the same licensed PDF renderer...
The PDFs render fine on every PDF reader I could find. Same here.
PDFs generated directly from Context MKIV from TeXLive 2022 using LuaTeX 1.5 render fine on these printers. I've also printed PDFs from pdfTeX in the past fine. Same here.
Any ideas what I should try to help debug this? I was told that this is the default now, that isn't going to change, and that I could always use LuaTeX instead. I could also use LaTeX, I guess, but I'd rather keep using ConTeXt at least while my old 32 bits OpenBSD installation works. what happens if you include the lmtx pdf in a mkiv document as image
On above Brother B205, this document:
\starttext
\externalfigure[foo.mkxl.pdf]
\stoptext
only prints the page number of the outer document, which is kept in a
seperate font:
NREXLC+LMRoman12-Regular CID Type 0C Identity-H yes yes yes 5 0
CLLXEY+LMRoman12-Regular CID Type 0C Identity-H yes yes yes 8 0
I tried converting the pdf with pdfjam (which uses pdfTeX internally)
before, which probably uses similar mechanisms, and it didn't work
either.
--
Leah Neukirchen
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 10/4/2022 12:53 PM, Leah Neukirchen wrote:
Hans Hagen via ntg-context
writes: On 10/4/2022 4:16 AM, Angel M Alganza via ntg-context wrote:
On Mon, Oct 03, 2022 at 07:17:10PM +0200, Leah Neukirchen via ntg-context wrote:
When I print this "directly" (i.e. sending the raw PDF to the printer) on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page. I believe that is the exact same problem I have and that I described a few days ago in my email with subject "Missing letters and numbers in printout". I have some grids on my document, which gets printed out, but nothing else does.
Another data point: Brother B205 doesn't print it either. But would all of these use the same licensed PDF renderer...
The PDFs render fine on every PDF reader I could find. Same here.
PDFs generated directly from Context MKIV from TeXLive 2022 using LuaTeX 1.5 render fine on these printers. I've also printed PDFs from pdfTeX in the past fine. Same here.
Any ideas what I should try to help debug this? I was told that this is the default now, that isn't going to change, and that I could always use LuaTeX instead. I could also use LaTeX, I guess, but I'd rather keep using ConTeXt at least while my old 32 bits OpenBSD installation works. what happens if you include the lmtx pdf in a mkiv document as image
On above Brother B205, this document:
\starttext \externalfigure[foo.mkxl.pdf] \stoptext
only prints the page number of the outer document, which is kept in a seperate font:
NREXLC+LMRoman12-Regular CID Type 0C Identity-H yes yes yes 5 0 CLLXEY+LMRoman12-Regular CID Type 0C Identity-H yes yes yes 8 0
I tried converting the pdf with pdfjam (which uses pdfTeX internally) before, which probably uses similar mechanisms, and it didn't work either. what is sent to the printer .. maybe not pdf but something the printer driver produces
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/6e692faf04b51988f266a31864bc1efe.jpg?s=120&d=mm&r=g)
Hans Hagen
what is sent to the printer .. maybe not pdf but something the printer driver produces
For the Ricoh and Samsung printers, we printed the raw PDF directly
over JetDirect (port 9100). For the Brother, the "upload PDF"
function was used. So no outside printer drivers involved.
If I run it through Ghostscript, that somehow fixes it:
gs -dPDF -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=print.pdf foo.pdf
But Ghostscript also seems to rewrite the font, at least in FontForge
it shows a different scale.
Are there any tools to analyze this CID font stream?
--
Leah Neukirchen
![](https://secure.gravatar.com/avatar/ed6f43113e3f1cee031ebd13654fc703.jpg?s=120&d=mm&r=g)
On 10/4/2022 2:35 PM, Leah Neukirchen via ntg-context wrote:
Hans Hagen
writes: what is sent to the printer .. maybe not pdf but something the printer driver produces
For the Ricoh and Samsung printers, we printed the raw PDF directly over JetDirect (port 9100). For the Brother, the "upload PDF" function was used. So no outside printer drivers involved.
If I run it through Ghostscript, that somehow fixes it: gs -dPDF -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=print.pdf foo.pdf normally gs complains when there is an issue
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/ed6f43113e3f1cee031ebd13654fc703.jpg?s=120&d=mm&r=g)
Hi, does (the obsolete) \enabledirectives[backend.pdf.forcecidset] help Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/6e692faf04b51988f266a31864bc1efe.jpg?s=120&d=mm&r=g)
Hans Hagen via ntg-context
Hi,
does (the obsolete)
\enabledirectives[backend.pdf.forcecidset]
help
No; same blank page. :(
(Also MKIV works without CIDSet...)
I looked into /StemV 0 (which was different in MKIV) but that works
with the TTF files, too. Also should be ignored for Type 3 anyway.
Really out of ideas now...
--
Leah Neukirchen
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 10/4/2022 5:52 PM, Leah Neukirchen via ntg-context wrote:
I looked into /StemV 0 (which was different in MKIV) but that works with the TTF files, too. Also should be ignored for Type 3 anyway. Does your test have type 3 fonts? Should be no problem.
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/ed6f43113e3f1cee031ebd13654fc703.jpg?s=120&d=mm&r=g)
Are there any tools to analyze this CID font stream? You can browse the glyphs with full acrobat (but I haven't a full acrobat installed ... I lost it when I upgraded my laptop and have no
On 10/4/2022 2:35 PM, Leah Neukirchen via ntg-context wrote: plans to buy a new version as I don't need it). Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/ed6f43113e3f1cee031ebd13654fc703.jpg?s=120&d=mm&r=g)
On 10/4/2022 5:44 PM, Henning Hraban Ramm via ntg-context wrote:
Am 04.10.22 um 14:59 schrieb Hans Hagen via ntg-context:
On 10/4/2022 2:35 PM, Leah Neukirchen via ntg-context wrote:
Are there any tools to analyze this CID font stream? You can browse the glyphs with full acrobat
You can? Not with Acrobat Pro v9 or before. it is hidden in preflight, some tiny entry in a menu "browse internal .." or so but as adobe loves to change user interfaces with each version i have no clue where you can find it
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/e5aa6984b53b8925e405ebbdbc051ad9.jpg?s=120&d=mm&r=g)
Am 04.10.22 um 18:11 schrieb Hans Hagen via ntg-context:
it is hidden in preflight, some tiny entry in a menu "browse internal .." or so but as adobe loves to change user interfaces with each version i have no clue where you can find it
Oops, I completely forgot that was part of Callas pdfInspektor (the plugin that Adobe bought as “Preflight” and didn’t even care to change the user interface). Ok, so we (I) can analyze which characters of which font are embedded. Here are the preflight reports (only about fonts and metadata) for Leah’s test files: https://sedna.fiee.net/d/055c7150d6f24136b513/ Small, but still too big as attachments. I don’t see anything suspicious. Sorry, I can generate them only in German. Hraban
![](https://secure.gravatar.com/avatar/e5aa6984b53b8925e405ebbdbc051ad9.jpg?s=120&d=mm&r=g)
Am 04.10.22 um 12:53 schrieb Leah Neukirchen via ntg-context:
Another data point: Brother B205 doesn't print it either. But would all of these use the same licensed PDF renderer...
Print the test page of all these printers. Does it say something about the PDF/PostScript engine (RIP) and its version? Printers that have an Adobe RIP usually have an Adobe sticker. But I’d guess that none of the mentioned printers has one of these. That doesn’t mean their RIP is worse. How do you send the files “directly” to the printer? Copy to lpt queue? In ye olden times you often used a PS downloader for such, but if it goes via the OS, there’s some driver involved. Hraban
![](https://secure.gravatar.com/avatar/a3a76177277476240dee1967f4b9a616.jpg?s=120&d=mm&r=g)
On Tue, Oct 04, 2022 at 01:59:45PM +0200, Henning Hraban Ramm via ntg-context wrote:
How do you send the files “directly” to the printer? Copy to lpt queue?
In my case, as I explained in my original email, I plug in a USB drive into the printer USB port, and I pick up the file to print from the printer software on a touch screen. I guess this qualifies as sendig te file directly to the printer queue? Cheers, Ángel
![](https://secure.gravatar.com/avatar/e5aa6984b53b8925e405ebbdbc051ad9.jpg?s=120&d=mm&r=g)
Am 04.10.22 um 15:21 schrieb Angel M Alganza via ntg-context:
On Tue, Oct 04, 2022 at 01:59:45PM +0200, Henning Hraban Ramm via ntg-context wrote:
How do you send the files “directly” to the printer? Copy to lpt queue?
In my case, as I explained in my original email, I plug in a USB drive into the printer USB port, and I pick up the file to print from the printer software on a touch screen. I guess this qualifies as sendig te file directly to the printer queue?
Yes, of course. Sorry, I didn’t read your mails thoroughly since I assumed I couldn’t help anyway. Hans, is it possible that LMTX uses some technique that is “too modern” for some built-in PDF interpreter? Hraban
![](https://secure.gravatar.com/avatar/ed6f43113e3f1cee031ebd13654fc703.jpg?s=120&d=mm&r=g)
Am 04.10.22 um 15:21 schrieb Angel M Alganza via ntg-context:
On Tue, Oct 04, 2022 at 01:59:45PM +0200, Henning Hraban Ramm via ntg-context wrote:
How do you send the files “directly” to the printer? Copy to lpt queue?
In my case, as I explained in my original email, I plug in a USB drive into the printer USB port, and I pick up the file to print from the printer software on a touch screen. I guess this qualifies as sendig te file directly to the printer queue?
Yes, of course. Sorry, I didn’t read your mails thoroughly since I assumed I couldn’t help anyway.
Hans, is it possible that LMTX uses some technique that is “too modern” for some built-in PDF interpreter? we basically use the old pre 1.6 embedding, same as luatex ... mayeb some other object is too modern (maybe some indirect reference is not seen or so but then one expects an error) .. I have no clue what is in
On 10/4/2022 6:03 PM, Henning Hraban Ramm via ntg-context wrote: those printers (it works here) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/d4bd34a45c928e8356f38323ff84763e.jpg?s=120&d=mm&r=g)
Am Tue, 4 Oct 2022 18:09:28 +0200 schrieb Hans Hagen via ntg-context:
Hans, is it possible that LMTX uses some technique that is “too modern” for some built-in PDF interpreter?
we basically use the old pre 1.6 embedding, same as luatex
I saw that the new code renumbers the glyphs, so it uses 0001, 0002 etc instead of the mix of various slot numbers in luatex. Perhaps the printers don't like that. -- Ulrike Fischer http://www.troubleshooting-tex.de/
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 10/6/2022 12:31 PM, Ulrike Fischer via ntg-context wrote:
Am Tue, 4 Oct 2022 18:09:28 +0200 schrieb Hans Hagen via ntg-context:
Hans, is it possible that LMTX uses some technique that is “too modern” for some built-in PDF interpreter?
we basically use the old pre 1.6 embedding, same as luatex
I saw that the new code renumbers the glyphs, so it uses 0001, 0002 etc instead of the mix of various slot numbers in luatex. Perhaps the printers don't like that. indeed, soem control code confusion; a few days ago i suggested a test for that and got no response yet
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/6e692faf04b51988f266a31864bc1efe.jpg?s=120&d=mm&r=g)
Hans Hagen via ntg-context
On 10/6/2022 12:31 PM, Ulrike Fischer via ntg-context wrote:
Am Tue, 4 Oct 2022 18:09:28 +0200 schrieb Hans Hagen via ntg-context:
Hans, is it possible that LMTX uses some technique that is “too modern” for some built-in PDF interpreter?
we basically use the old pre 1.6 embedding, same as luatex I saw that the new code renumbers the glyphs, so it uses 0001, 0002 etc instead of the mix of various slot numbers in luatex. Perhaps the printers don't like that. indeed, soem control code confusion; a few days ago i suggested a test for that and got no response yet
Sorry, I didn't have access to a printer until last night.
As I expected, starting the numbering from 31 doesn't help
either---still blank pages. (Note that with DejaVu Sans the numbering
from 1 works fine.)
But I also found yet another printer model that doesn't print:
the HP Color LaserJet 4700 (Model Q7492A, Firmware 20060821 46.031.1).
Since you seem to own the only printer that works ;) would
you be so kind and share which model you have?
I also wondered whether bisecting the snapshot-repo would work.
But I only have one LMTX binary; this font handling should be all in
lua code tho?
--
Leah Neukirchen
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 10/6/2022 2:42 PM, Leah Neukirchen wrote:
But I also found yet another printer model that doesn't print: the HP Color LaserJet 4700 (Model Q7492A, Firmware 20060821 46.031.1).
Since you seem to own the only printer that works ;) would you be so kind and share which model you have?
We have a HP ColorFlowMFP X585 full-width highspeed duplex inkjet printer (a couple of years old, always prints ok). So far we never heard of printing failures elsewhere.
I also wondered whether bisecting the snapshot-repo would work. But I only have one LMTX binary; this font handling should be all in lua code tho?
It makes no sense to compare luametatex and luatex .. it's different machinery. Btw, some in the thread mention issues (like bad looking heros shapes) but in your case there is no print at all, so that is different. Isn't there some error log in these printer? Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/6e692faf04b51988f266a31864bc1efe.jpg?s=120&d=mm&r=g)
Hans Hagen via ntg-context
On 10/6/2022 2:42 PM, Leah Neukirchen wrote:
But I also found yet another printer model that doesn't print: the HP Color LaserJet 4700 (Model Q7492A, Firmware 20060821 46.031.1). Since you seem to own the only printer that works ;) would you be so kind and share which model you have?
We have a HP ColorFlowMFP X585 full-width highspeed duplex inkjet printer (a couple of years old, always prints ok). So far we never heard of printing failures elsewhere.
I also wondered whether bisecting the snapshot-repo would work. But I only have one LMTX binary; this font handling should be all in lua code tho?
It makes no sense to compare luametatex and luatex .. it's different machinery.
Btw, some in the thread mention issues (like bad looking heros shapes) but in your case there is no print at all, so that is different. Isn't there some error log in these printer?
The error log didn't contain anything useful.
I made two experiments now.
First, I modified the MKIV PDF file to use the MKXL font stream, and
changed the text primitives to use low chars. This renders fine on
all PDF viewers I found (text is garbled, of course), but it still
doesn't print. So now I'm fairly sure now the bug is in the font stream.
I finally found a tool to analyze CID fonts at
https://github.com/janpe2/CFFDump
I noticed two things:
1) the MKIX Top DICT INDEX doesn't contain /version, but the string is
in the SID. Unfortunately merely adding it to topdict in
tablewriters.cff doesn't fix the printing bug. But I'd still
recommend doing so.
2) The Private DICT doesn't contain /StdHW /StdVW /StemSnapH /StemSnapV.
Also BlueScale is 0.
This should not matter for printing(?) but it explains why
Adobe displays it differently! The hinting information is missing.
Note that the code would copy this data but it's missing in the
cffinfo already.
I'll attach both CFF dumps here, perhaps someone finds other issues.
cu,
--
Leah Neukirchen
![](https://secure.gravatar.com/avatar/413051f5ef37416e8bd7c228ea721eb9.jpg?s=120&d=mm&r=g)
Hi all,
I use LuaMetaTeX 2.10 20220918 + ConTeXt LMTX 2022.09.11.
Here's a tiny test document, I disabled PDF compression but it also doesn't work with the default settings.
\setupbackend[level=0,compresslevel=0] \starttext Just a line of text. \stoptext
When I print this "directly" (i.e. sending the raw PDF to the printer) on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page.
Just to add some more data points, I tested the attached MkXL file on two printers, and the file printed perfectly on both. Printer 1: Brother HL-3170CDW Printed via running "cat test.mkxl.pdf | nc Colour-Printer.local 9100" Printer 2: HP M227f LaserJet Printed from the PDF file on a USB stick Neither printer is anything fancy; they're both fairly inexpensive home laser printers. I've got a much older Brother laser printer that I may be able to test with next week. Sorry I can't be of more help. -- Max
![](https://secure.gravatar.com/avatar/ed6f43113e3f1cee031ebd13654fc703.jpg?s=120&d=mm&r=g)
On 10/9/2022 8:03 AM, Max Chernoff via ntg-context wrote:
Hi all,
I use LuaMetaTeX 2.10 20220918 + ConTeXt LMTX 2022.09.11.
Here's a tiny test document, I disabled PDF compression but it also doesn't work with the default settings.
\setupbackend[level=0,compresslevel=0] \starttext Just a line of text. \stoptext
When I print this "directly" (i.e. sending the raw PDF to the printer) on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page.
Just to add some more data points, I tested the attached MkXL file on two printers, and the file printed perfectly on both.
Printer 1: Brother HL-3170CDW Printed via running "cat test.mkxl.pdf | nc Colour-Printer.local 9100"
Printer 2: HP M227f LaserJet Printed from the PDF file on a USB stick
Neither printer is anything fancy; they're both fairly inexpensive home laser printers. I've got a much older Brother laser printer that I may be able to test with next week.
Sorry I can't be of more help.
Leah and I are zooming in on the issue. It might relate to wrong font matrix default behavior in the pdf printer driver, and GS got a fix for that long ago, so maybe old printers with not-updated drivers can be affected. Once we're confident that we can catch it Leah (who does the low level introspective testing with viewers, printers and tools) likely will report on it and there will be a test file for users to test if what we do is okay before we apply the safeguard. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/6e692faf04b51988f266a31864bc1efe.jpg?s=120&d=mm&r=g)
Hans Hagen via ntg-context
On 10/9/2022 8:03 AM, Max Chernoff via ntg-context wrote:
Hi all,
I use LuaMetaTeX 2.10 20220918 + ConTeXt LMTX 2022.09.11.
Here's a tiny test document, I disabled PDF compression but it also doesn't work with the default settings.
\setupbackend[level=0,compresslevel=0] \starttext Just a line of text. \stoptext
When I print this "directly" (i.e. sending the raw PDF to the printer) on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page. Just to add some more data points, I tested the attached MkXL file on two printers, and the file printed perfectly on both. Printer 1: Brother HL-3170CDW Printed via running "cat test.mkxl.pdf | nc Colour-Printer.local 9100" Printer 2: HP M227f LaserJet Printed from the PDF file on a USB stick Neither printer is anything fancy; they're both fairly inexpensive home laser printers. I've got a much older Brother laser printer that I may be able to test with next week. Sorry I can't be of more help. Leah and I are zooming in on the issue. It might relate to wrong font matrix default behavior in the pdf printer driver, and GS got a fix for that long ago, so maybe old printers with not-updated drivers can be affected.
Once we're confident that we can catch it Leah (who does the low level introspective testing with viewers, printers and tools) likely will report on it and there will be a test file for users to test if what we do is okay before we apply the safeguard.
There's a write up now on the issue:
https://leahneukirchen.org/blog/archive/2022/10/50-blank-pages-or-black-box-...
--
Leah Neukirchen
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Tue, 11 Oct 2022, Leah Neukirchen via ntg-context wrote:
Hans Hagen via ntg-context
writes:
Once we're confident that we can catch it Leah (who does the low level introspective testing with viewers, printers and tools) likely will report on it and there will be a test file for users to test if what we do is okay before we apply the safeguard.
There's a write up now on the issue: https://leahneukirchen.org/blog/archive/2022/10/50-blank-pages-or-black-box-...
Wow, that was quite a ride. Kudos on getting to the bottom of this! Aditya
![](https://secure.gravatar.com/avatar/413051f5ef37416e8bd7c228ea721eb9.jpg?s=120&d=mm&r=g)
Hi Leah,
Leah and I are zooming in on the issue. It might relate to wrong font matrix default behavior in the pdf printer driver, and GS got a fix for that long ago, so maybe old printers with not-updated drivers can be affected.
Once we're confident that we can catch it Leah (who does the low level introspective testing with viewers, printers and tools) likely will report on it and there will be a test file for users to test if what we do is okay before we apply the safeguard.
There's a write up now on the issue: https://leahneukirchen.org/blog/archive/2022/10/50-blank-pages-or-black-box-...
Great write up! I was expecting the issue to be something quite simple, but it's actually fairly complicated. Especially considering that the issue only happens with a few printer models, I'm pretty impressed that you managed to find the problem. At least the fix appears quite easy. Seeing that you're modifying the font encoding, could you perhaps reconsider supporting hinting in LMTX? https://mailman.ntg.nl/pipermail/ntg-context/2022/106311.html Even with a high resolution screen, I can still see a difference, and the issue can show up in print too: https://graphicdesign.stackexchange.com/q/5874 I'm fairly confident that these issues are all hinting-related: https://mailman.ntg.nl/pipermail/ntg-context/2022/106874.html https://mailman.ntg.nl/pipermail/ntg-context/2022/105212.html Considering that all of the fonts included with ConTeXt are hinted, it seems like a shame to not include any of that data in the generated PDFs. Thanks, -- Max
![](https://secure.gravatar.com/avatar/6e692faf04b51988f266a31864bc1efe.jpg?s=120&d=mm&r=g)
Max Chernoff via ntg-context
Hi Leah,
Leah and I are zooming in on the issue. It might relate to wrong font matrix default behavior in the pdf printer driver, and GS got a fix for that long ago, so maybe old printers with not-updated drivers can be affected.
Once we're confident that we can catch it Leah (who does the low level introspective testing with viewers, printers and tools) likely will report on it and there will be a test file for users to test if what we do is okay before we apply the safeguard.
There's a write up now on the issue: https://leahneukirchen.org/blog/archive/2022/10/50-blank-pages-or-black-box-...
Great write up! I was expecting the issue to be something quite simple, but it's actually fairly complicated. Especially considering that the issue only happens with a few printer models, I'm pretty impressed that you managed to find the problem. At least the fix appears quite easy.
Seeing that you're modifying the font encoding, could you perhaps reconsider supporting hinting in LMTX?
https://mailman.ntg.nl/pipermail/ntg-context/2022/106311.html
Even with a high resolution screen, I can still see a difference, and the issue can show up in print too:
https://graphicdesign.stackexchange.com/q/5874
I'm fairly confident that these issues are all hinting-related:
https://mailman.ntg.nl/pipermail/ntg-context/2022/106874.html https://mailman.ntg.nl/pipermail/ntg-context/2022/105212.html
Considering that all of the fonts included with ConTeXt are hinted, it seems like a shame to not include any of that data in the generated PDFs.
The last version of font-cff.lua should also copy the hinting-related
values of the CFF properly (/BlueScale, /StemSnap[HV] etc).
We fixed that on the side. ;)
--
Leah Neukirchen
![](https://secure.gravatar.com/avatar/413051f5ef37416e8bd7c228ea721eb9.jpg?s=120&d=mm&r=g)
On Wed, 2022-10-12 at 13:14 +0200, Leah Neukirchen wrote:
Seeing that you're modifying the font encoding, could you perhaps reconsider supporting hinting in LMTX?
https://mailman.ntg.nl/pipermail/ntg-context/2022/106311.html
Even with a high resolution screen, I can still see a difference, and the issue can show up in print too:
https://graphicdesign.stackexchange.com/q/5874
I'm fairly confident that these issues are all hinting-related:
https://mailman.ntg.nl/pipermail/ntg-context/2022/106874.html https://mailman.ntg.nl/pipermail/ntg-context/2022/105212.html
Considering that all of the fonts included with ConTeXt are hinted, it seems like a shame to not include any of that data in the generated PDFs.
The last version of font-cff.lua should also copy the hinting-related values of the CFF properly (/BlueScale, /StemSnap[HV] etc). We fixed that on the side. ;)
Yay! Thanks, -- Max
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 10/13/22 00:50, Max Chernoff via ntg-context wrote:
On Wed, 2022-10-12 at 13:14 +0200, Leah Neukirchen wrote:
[...] The last version of font-cff.lua should also copy the hinting-related values of the CFF properly (/BlueScale, /StemSnap[HV] etc). We fixed that on the side. ;)
Yay!
Many thanks for your work fixing this, Leah and Hans. The only remaining question is then when the new version will be be released. Many thanks again for your work, Pablo
![](https://secure.gravatar.com/avatar/e5aa6984b53b8925e405ebbdbc051ad9.jpg?s=120&d=mm&r=g)
Am 13.10.22 um 19:41 schrieb Pablo Rodriguez via ntg-context:
On 10/13/22 00:50, Max Chernoff via ntg-context wrote:
On Wed, 2022-10-12 at 13:14 +0200, Leah Neukirchen wrote:
[...] The last version of font-cff.lua should also copy the hinting-related values of the CFF properly (/BlueScale, /StemSnap[HV] etc). We fixed that on the side. ;)
Yay!
Many thanks for your work fixing this, Leah and Hans.
The only remaining question is then when the new version will be be released.
They who attended the latest online meeting know that there’s a secret project going on that needs to be completed first. Hraban
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 10/13/2022 8:36 PM, Henning Hraban Ramm via ntg-context wrote:
Am 13.10.22 um 19:41 schrieb Pablo Rodriguez via ntg-context:
On 10/13/22 00:50, Max Chernoff via ntg-context wrote:
On Wed, 2022-10-12 at 13:14 +0200, Leah Neukirchen wrote:
[...] The last version of font-cff.lua should also copy the hinting-related values of the CFF properly (/BlueScale, /StemSnap[HV] etc). We fixed that on the side. ;)
Yay!
Many thanks for your work fixing this, Leah and Hans.
The only remaining question is then when the new version will be be released.
They who attended the latest online meeting know that there’s a secret project going on that needs to be completed first. let's keep it a secret till at least the next meetup .. after all it relates to a more that 30 year old sort of secret
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 10/13/22 00:50, Max Chernoff via ntg-context wrote:
On Wed, 2022-10-12 at 13:14 +0200, Leah Neukirchen wrote:
[...] The last version of font-cff.lua should also copy the hinting-related values of the CFF properly (/BlueScale, /StemSnap[HV] etc). We fixed that on the side. ;)
Yay!
Many thanks for your work fixing this, Leah and Hans.
The only remaining question is then when the new version will be be released. some day soon ... the apple m1 has to come online first (afaik apple didn't release a robust vm yet so the machine has to be kicked into action every now and then) and we only release when we can do all
On 10/13/2022 7:41 PM, Pablo Rodriguez via ntg-context wrote: platforms ... apart from ms and me wanting to finish something first it's not that no-one can print, right? Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/6af06dcf5f958fe4ec149408292d6acd.jpg?s=120&d=mm&r=g)
Now! I am astonished about this blog! Super that you, Leah and Hans, insisted to find out what the culprit was! Thank you both so much for your effort! Kind regards Willi
On 11 Oct 2022, at 21:07, Leah Neukirchen via ntg-context
wrote: Hans Hagen via ntg-context
writes: On 10/9/2022 8:03 AM, Max Chernoff via ntg-context wrote:
Hi all,
I use LuaMetaTeX 2.10 20220918 + ConTeXt LMTX 2022.09.11.
Here's a tiny test document, I disabled PDF compression but it also doesn't work with the default settings.
\setupbackend[level=0,compresslevel=0] \starttext Just a line of text. \stoptext
When I print this "directly" (i.e. sending the raw PDF to the printer) on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page. Just to add some more data points, I tested the attached MkXL file on two printers, and the file printed perfectly on both. Printer 1: Brother HL-3170CDW Printed via running "cat test.mkxl.pdf | nc Colour-Printer.local 9100" Printer 2: HP M227f LaserJet Printed from the PDF file on a USB stick Neither printer is anything fancy; they're both fairly inexpensive home laser printers. I've got a much older Brother laser printer that I may be able to test with next week. Sorry I can't be of more help. Leah and I are zooming in on the issue. It might relate to wrong font matrix default behavior in the pdf printer driver, and GS got a fix for that long ago, so maybe old printers with not-updated drivers can be affected.
Once we're confident that we can catch it Leah (who does the low level introspective testing with viewers, printers and tools) likely will report on it and there will be a test file for users to test if what we do is okay before we apply the safeguard.
There's a write up now on the issue: https://leahneukirchen.org/blog/archive/2022/10/50-blank-pages-or-black-box-...
-- Leah Neukirchen
https://leahneukirchen.org/ ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________
participants (10)
-
Aditya Mahajan
-
Angel M Alganza
-
Hans Hagen
-
Hans Hagen
-
Henning Hraban Ramm
-
Leah Neukirchen
-
Max Chernoff
-
Pablo Rodriguez
-
Ulrike Fischer
-
Willi Egger