Skip to content

Commit 9d6ff29

Browse files
committed
update readme and fix ading2210#2
1 parent fd76d31 commit 9d6ff29

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Diff for: README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Try it here: [linux.pdf](https://linux.doompdf.dev/linux.pdf)
66

77
https://github.com/user-attachments/assets/7e992dd1-41a5-4d32-87cc-878b395e3d92
88

9+
See also: [DoomPDF](https://github.com/ading2210/doompdf)
10+
911
## Explanation
1012

1113
This works in a very similar way to my previous [DoomPDF](https://github.com/ading2210/doompdf) project.
@@ -18,7 +20,7 @@ C code can be compiled to run within a PDF using an old version of Emscripten th
1820

1921
The largest problem here is with the emulator's performance. For example, the Linux kernel takes about 30-60 seconds to boot up within the PDF, which over 100x slower than normal. Unfortunately, there's no way to fix this, since the version of V8 that Chrome's PDF engine uses has its [JIT compiler disabled](https://source.chromium.org/chromium/_/pdfium/pdfium/+/012fe571c9fe430da68dbcd2f5ba21758db0ae15:fpdfsdk/fpdf_view.cpp;l=1211-1214;drc=b69783fd189976dd4625c7dcd9c07921b94d4a3c;bpv=0;bpt=0), destroying its performance.
2022

21-
For the root filesystem, there are both 64 and 32 bit versions possible. The default is a 32 bit buildroot system (which was prebuilt and taken from the original TinyEMU examples), and also a 64 bit Alpine Linux system. The 64 bit emulator is about as twice slow however, so it's normally not used.
23+
For the root filesystem, there are both 64 and 32 bit versions possible. The default is a 32 bit buildroot system (which was prebuilt and taken from the original TinyEMU examples), and also a 64 bit Alpine Linux system. The 64 bit emulator is about twice as slow however, so it's normally not used.
2224

2325
## Build Instructions
2426

Diff for: gen_pdf.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ def create_keys_row(keys, x, y, width, height, gap):
8989
new_x = x + i * (width + gap)
9090
button = create_button(name, new_x, y, width, height, key.upper())
9191
button.AA = PdfDict()
92+
if key == "'":
93+
key = "\\'"
9294
button.AA.D = create_script(f"button_down('{key}')")
9395
button.AA.U = create_script(f"button_up('{key}')")
9496
buttons.append(button)
@@ -134,7 +136,7 @@ def create_keys_row(keys, x, y, width, height, gap):
134136
dict(key="Enter", x=542, y=108, width=58, height=16),
135137

136138
dict(key="Shift", x=220, y=88, width=44, height=16, toggle=True),
137-
dict(key="Shift", x=530, y=88, width=70, height=16),
139+
dict(key="RShift", x=530, y=88, width=70, height=16),
138140

139141
dict(key="Ctrl", x=220, y=68, width=36, height=16, toggle=True),
140142
dict(key="Alt", x=260, y=68, width=36, height=16, toggle=True),

0 commit comments

Comments
 (0)