• by transfire on 1/31/2025, 11:21:26 PM

    That’s just wrong.

    It’s no wonder we have endless security issues when documents that should be just data and metadata (layout) declarations are Turing complete. Sigh.

  • by teruakohatu on 2/1/2025, 4:53:10 AM

    When the last Tetris PDF was on the HN homepage I looked into ways of disabling JS in PDFs but was unable to find anyway other than disabling JS for the entire browser. I tried messing about with uBlock filters but to no avail. Does anyone know if this can be achieved?

  • by xarope on 2/6/2025, 9:17:38 AM

      on one hand: applauds ingenuity
    
      on other hand: gapes at major security hole in PDF, wonders why this is defacto document type in industry for reading

  • by IgorPartola on 2/1/2025, 1:48:45 AM

    So you can run a PDF reader inside it to display a PDF? Honestly I am a little worried someone will come up with some sort of smart DRM based on this.

    In seriousness, it’s impressive and highlights how awful the PDF format is. Can we have a document format that is less encumbered, more structured, and more accepted as a “real” document yet?

  • by AMICABoard on 2/1/2025, 8:21:09 AM

    Damn Good stuff, bot the doom and this linux of your! Kudos.

    I had done LLM in PDF sometime Nov last year but it wasn't released. Since the doom in pdf uptick, I had released a demo here:

    https://x.com/VulcanIgnis/status/1879649889178837025

    Actually you don't need an old version of emscripten, hit me up for the Makefile and pdf templates or wait till offical release. My build script will make the pdf work both on chrome and firefox, adobe support is pending.

  • by cedws on 2/2/2025, 12:11:33 AM

    This is kind of what NSO Group’s Pegasus did to break out of iPhone sandboxing. They exploited a codec to bootstrap a virtual machine with a custom instruction set.

  • by ks2048 on 1/31/2025, 11:04:27 PM

    Wow. I guess it was just a matter of time after seeing the Doom and Tetris PDFs.

    FYI, the PDF is 6.2 MB.

  • by hcarvalhoalves on 2/1/2025, 12:05:27 AM

    You people really managed to sprinkle JS everywhere, even on PDF. Shame on you.

  • by sedatk on 2/1/2025, 12:33:51 AM

    On Edge (Chromium), I get this error message instead:

      An embedded page at linux.doompdf.dev says
      TypeError: Cannot set properties of null (setting 'value')
        at Object.0.9657115108887302 (<anonymous>:248:42)
        at set_interval_callback (<anonymous>:43:24)
        at <anonymous>:1:6

  • by humptybumpty on 2/1/2025, 1:12:14 PM

    Kernel boot message:

    ”This architecture does not have memory protection”

    —_—

  • by dang on 2/1/2025, 7:36:56 AM

    Recent and related:

    Show HN: Doom (1993) in a PDF - https://news.ycombinator.com/item?id=42678754 - Jan 2025 (74 comments)

  • by b1n on 2/1/2025, 4:32:44 AM

    I've invented a replacement for the PDF format.

    It's called Locked Markdown. `*.lmd`.

    It provides 98% of the functionality most people use PDFs for, without all the extra bullshit.

    The Spec:

    - The most popular Markdown Spec (git flavour?)

    - At the top of the page place a hash sum of the markdown below a marker on the page.

    LMD Reader:

    - Prevents editing the markdown.

    - Warns user if the hash sum is not valid.

    Example:

    ```lmd

    sha256 77ec0f678315f8a207c3501137e1dfc9642b79a9c93e21807df7b5242846c05c

    -------------------------------

    # Header 1

    Paragraph of text about how bloated the PDF format is.

    ```

    Zip .lmd together with images/videos if required.

  • by purplejacket on 2/1/2025, 2:55:53 AM

    See? This is _exactly_ why Facebook banned Linux.

  • by ubj on 2/1/2025, 4:22:29 AM

    Now all we need is a PDF reader embedded within a PDF. Bonus points for enabling it to open itself for infinite recursion.

  • by revskill on 2/1/2025, 6:18:41 AM

    Now install the pdf reader and open the pdf inside that os.

  • by 0xDEAFBEAD on 2/1/2025, 4:55:12 AM

    Is there even a single solid motivating example for why JS in PDF is useful? Can anyone show a real-world application of JS in PDF where it's actually a good fit?

    I just don't see why PDF would be your file format of choice if you're writing JS.