by stink on Jul 2, 2021 link
An interest of yours? It's an interpreter for a programming language and PDFs - how does that work?
  • by iloveny123 on Jul 2, 2021
    Yes.

    Ghostscript is like the "FFMPEG" of PDFs, it can split pages, extract pages, combine pages, encrypt and decrypt PDF files, etc.... It is also one of the only implementations of Postscript, which was what people used before PDF. One time i also used it to redact part of tax filing document before i sent it to someone who needed it. While other software only do half redactions, Ghostscript can do a complete redaction.

    The problem with Postscript is that it was a programming language and it had to be compiled (so opening a postscript file could be very slow). PDF files had the compiled results of the postscript directives, so they loaded faster.

    A fun fact about it is that the PDF interpreter was written in Postscript itself, but now they have to rewrite it in C because the PDF spec has far exceeded the abilities of Postscript.


    Also: https://github.com/Lucas-C/undying-dusk#download and https://www.youtube.com/watch?v=tbxfdHNSJlo to give you an idea of what even compiled postscript can do.