Live data from Hacker News

Linux running inside a PDF file via a RISC-V emulator

github.com

11–20 of 43 posts

Re: Linux running inside a PDF file via a RISC-V emulator

#14
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.

Re: Linux running inside a PDF file via a RISC-V emulator

#15
post #14

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…

What is stopping me just unzipping it, altering the file, hashing the file below the header and then zipping it back up?

Re: Linux running inside a PDF file via a RISC-V emulator

#16

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

Completely agree lol, why the downvotes?

Probably because JavaScript has been part of pdfs since Acrobat 4, way back in the last millennium.

Re: Linux running inside a PDF file via a RISC-V emulator

#17
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?

Re: Linux running inside a PDF file via a RISC-V emulator

#19
post #14

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…

What is stopping me just unzipping it, altering the file, hashing the file below the header and then zipping it back up?

DMCA and Trademarks

Re: Linux running inside a PDF file via a RISC-V emulator

#20

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.

It is allowed by the PDF/A-3 standard which lets you embed data and script into a PDF. And this is used as the archive standard for PDF files sent in electronic invoicing in a number of countries. Basically you get a human readable file containing the data presented and its digitally signed so your data matches the readable presentation.
Post reply on HN