mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 08:21:39 -06:00
97cd03325f
Scanned books are commonly distributed as DjVu, which the scanner only stored as a supplement. Decode pages on the server with DjVuLibre so DjVu imports with a cover and page count, opens in the image reader with its embedded OCR text, and can be the preferred format of an ordinary email recipient. Migration 0113 widens the recipient format check to allow it. Decoding runs on validated private snapshots behind a bounded, reader-first queue, and revalidation and cached pages are answered without a decoder. Released iOS builds cannot open DjVu, so series continuation offers it only to callers sending includeDjvu=true, and the dashboard and notebook read file never name it. The first full scan after upgrading promotes stored .djvu supplements to content.
15 lines
892 B
TypeScript
15 lines
892 B
TypeScript
// Synthetic 80x120 color page generated with c44; no downloaded document or metadata.
|
|
export function djvuPageFixture(): Buffer {
|
|
return Buffer.from(
|
|
'QVQmVEZPUk0AAAB5REpWVUlORk8AAAAKAFAAeBgAZAAWAUJHNDQAAAA5AEoBAgBQAHiK/4/WFVL9KZ/P+U/5tbAAX5D9Z9/+vMGwH////04eo4Tb/zvtSoSRsZHVE+e9Q+trAEJHNDQAAAAJAQ///w5zz75/AEJHNDQAAAAHAgr/8OMWzg==',
|
|
'base64',
|
|
);
|
|
}
|
|
|
|
export function djvuBundleFixture(): Buffer {
|
|
return Buffer.from(
|
|
'QVQmVEZPUk0AAAE3REpWTURJUk0AAAAngQACAAAAQAAAAML//+C/ih/u82uWgGzIJJ4n4vgfzH1u5mMh7gAeAEZPUk0AAAB5REpWVUlORk8AAAAKAFAAeBgAZAAWAUJHNDQAAAA5AEoBAgBQAHiK/4/WFVL9KZ/P+U/5tbAAX5D9Z9/+vMGwH////04eo4Tb/zvtSoSRsZHVE+e9Q+trAEJHNDQAAAAJAQ///w5zz75/AEJHNDQAAAAHAgr/8OMWzgBGT1JNAAAAeURKVlVJTkZPAAAACgBQAHgYAGQAFgFCRzQ0AAAAOQBKAQIAUAB4iv+P1hVS/Smfz/lP+bWwAF+Q/Wff/rzBsB////9OHqOE2/877UqEkbGR1RPnvUPrawBCRzQ0AAAACQEP//8Oc8++fwBCRzQ0AAAABwIK//DjFs4=',
|
|
'base64',
|
|
);
|
|
}
|