.. post:: 2024-12-31 :category: C64 :tags: C64, The Newsroom, DTP, Printer Matrix impact printer in 2024 ============================= Earlier last year Cameron Kaiser used a modern computer to prepare the content of a newspaper page for the 1984 DTP software „The Newsroom“: `Printing real headline news on the Commodore 64 with The Newsroom's Wire Service `_. The actual printing from the C64 was done in VICE_, producing a text file which was then converted to an image by a Perl script and put into a PDF with ``convert`` for actually printing it. On a current printer, despite saying „[…] after all, if you want to make it look like it came from 1985, use something that came from 1985.“ Those crisp big square pixels don't really look like they came from a 1985 printer hooked to a C64. So I looked into ways to print that image to an Epson compatible 9-pin impact printer under Linux. Installing an Epson FX-80 printer driver isn't a big deal. Printing the PDF resembled the page, but was unreadable: .. figure:: cups_original.png :alt: Section of the print-out of the original PDF :class: figure-shadow Cameron made the bitmap a bit larger and placed it in the middle of a letter sized page into a PDF file. It's smaller than a dot matrix printer would have printed it, so there are dots missing in the printout. I was a bit sceptical if this approach — creating a PDF and then printing *that* — might work at all. The PDF must have black and white pixels quite precisely at the correct places to match up the matrix raster the printer uses. Which is even distorted because there are 60 dots per inch across but 72 dots per inch vertically. Instead of ``convert`` I've used the small Python program below and the `MµPDF `_ library to wrap the bitmap into a PDF mapped onto the same space it would cover when printed by a matrix printer with the 60×72 DPI resolution from the old days. .. code-block:: python #!/usr/bin/env python3 import pymupdf def main(): document = pymupdf.open() width, height = pymupdf.paper_size("letter") page = document.new_page(width=width, height=height) image = pymupdf.Pixmap("output.pbm") image.set_dpi(60, 72) image.interpolate = False assert image.width == 480 page.insert_image( pymupdf.Rect(0, 0, (480 // 60) * 72, image.height) + 18, pixmap=image, keep_proportion=False, ) document.save("output.pdf") if __name__ == "__main__": main() Then sending the resulting PDF to the FX-80 compatible printer via ``lpr -P fx-80 -o media=letter -o Resolution=60x72dpi output.pdf`` resulted, a little bit to my suprise, in a readable printout! .. figure:: cups_mupdf.png :alt: Section of the print-out of the MµPDF created PDF :class: figure-shadow Each pixel is at the right spot on the PDF page to be picked up by the CUPS printer driver and was hammered with a pin onto the paper exactly once. .. Letter convert output.pbm -resize 520 -gravity center -background white -extent 612x792 output.pdf .. A4 convert output.pbm -resize 520 -gravity center -background white -extent 595x842 output.pdf .. lpr -P fx-80 -o media=letter -o Resolution=60x72dpi -o page-border=border "double", "double-thick", "single", or "single-thick". .. _VICE: https://vice-emu.sourceforge.io/