Codync
무료 오픈소스 1:1 대안, Grok Bot과 Muse 대신
PDF 파일을 파싱·해석·렌더링하는 Rust 크레이트 모음입니다
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.