Codync
免费开源的 1:1 Grok Bot 与 Muse 替代方案。可在 iPhone、Mac 或 Linux 桌面上将 Claude 代码、Codex、Cursor 以及 40 多个编码代理作为持久机器人使用。支持群组聊天、线程、应用。
AI 翻译
A set of Rust crates for parsing, interpreting and rendering PDF files.
翻译准备中
开发工具Rust · JavaScriptGitHub @LaurenzV自行安装运营者未确认
试用过了吗? 点一下就好,无需登录。
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
安装型项目无需部署域名也可验证。个人仓库可通过 GitHub 登录验证,组织仓库可使用上方的仓库验证文件。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗A set of Rust crates for parsing, interpreting and rendering PDF files.
There are many Rust crates that can parse and process PDF files.
hayro was created with the following design decisions in mind, some of which distinguish it from
other alternatives:
lopdf
convert the PDF into an internal representation, such that it can also be edited and manipulated.
hayro-syntax provides read-only access. The advantage of doing this is that it makes parsing
much faster and more memory-efficient, as we don't need to allocate as much. Of course, the
downside is that, unlike other crates, you can't manipulate the document. If you need that
ability, you still can build that logic yourself on top of hayro-syntax (or use other crates
complementarily), but it isn't provided out of the box. For now, providing support for document
manipulation is out-of-scope, though I might change my mind in the future if there is demand and I
find time to implement it.hayro-syntax, you get the bare minimum that is needed to successfully parse
PDF files, but it doesn't attempt to provide support for parsing fonts or evaluating PDF
functions. As a result, hayro-syntax is a very lightweight dependency.hayro remains the library with the highest correctness, which is
underpinned by a visual regression test suite consisting of 1,600+ PDFs, many of which are tricky
PDFs that have been scraped from the test suite of other PDF engines, like pdf.js or PDFBox.In its current state, you can use hayro and basically expect almost any PDF that renders in other
viewers like Chrome (PDFium) or Firefox (pdf.js) to render correctly. Any feature that is expected
to work in most PDF viewers should also work in hayro. This excludes some more exotic features like
knockout groups, CMYK blending or 3D content, which are basically only supported in Acrobat.
The three main remaining aspects that still need work are:
hayro crates already have extensive checks to avoid panics/timeouts on
untrusted inputs, there are still many ways to trigger timeouts and OOM errors.hayro can already render many PDFs faster than other PDF viewers, but there
still remain many gaps which are due to inefficiencies and lack of certain features, like glyph
caching.I am currently actively working on resolving all of these.
As mentioned above, the hayro project consists of a number of sub-crates, each of which can be
used individually if desired. These include:
hayro-syntax: Low-level parsing and reading of PDF files.hayro-interpret: A PDF interpreter emitting commands into an abstract
Device.hayro: Rendering PDF pages into bitmaps.hayro-svg: Converting PDF pages into SVG images.hayro-jpeg2000: A JPEG2000 image decoder.hayro-jbig2: A JBIG2 image decoder.hayro-ccitt: A decoder for group 3 and group 4 CCITT-encoded images.hayro-postscript: A lightweight scanner for a specific subset of PostScript.hayro-cmap: A parser for CMap files in PDFs.hayro-font: Parsing the fonts of PDF files.A demo tool can be found at https://laurenzv.github.io/hayro/. Please note that this is just a
quick, vibe-coded PDF viewer, not intended to be used as an actual viewer. Features such as text
selection, search, annotations, and forms are not implemented there and out of scope. It's only
meant as a quick way to test the rendering capabilities and performance of hayro.
The minimum supported Rust version is 1.92.