C14.14: export HTML, HTML and folder, PDF (MuPDF story in the PDF worker) and plain text; print; rich copy

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-12 10:16:11 -04:00
1 parent f1cb7eff99
commit d7ded183ae
27 files changed
+1427 -24

No files matched your search

+7 -1
View File
@@ -2,7 +2,7 @@
use std::{io, path::Path};
use ely_ipc::Unpack;
use ely_ipc::{Pack, Unpack};
use crate::client::{Doc, Worker};
use crate::proto::tag;
@@ -42,6 +42,12 @@ impl Worker {
self.request(tag::PRINT_COPY, &self.whole(&doc)?.str(utf8(out)?).bytes()).map(|_| ())
}
/// HTML `page` in `dir`, with its pictures, as a PDF.
pub fn html_pdf(&mut self, dir: &Path, page: &str, out: &Path) -> io::Result<()> {
let ask = Pack::new().str(utf8(dir)?).str(page).str(utf8(out)?);
self.request(tag::HTML_PDF, &ask.bytes()).map(|_| ())
}
/// Decodes every picture; true if any failed.
pub fn check_pictures(&mut self, doc: Doc) -> io::Result<bool> {
let reply = self.request(tag::CHECK_PICTURES, &self.whole(&doc)?.bytes())?;