关于PDFTron WebViewer两种文档后端概念的技术咨询
Understanding PDFTron WebViewer's "Backends"
Great question—this term can be confusing because it’s not referring to a traditional server backend, but rather the client-side document processing/rendering engine that WebViewer uses under the hood. Let me break down the two options clearly:
1. PDFNetJS Backend
- This is PDFTron's native, high-performance PDF processing engine compiled to JavaScript/WebAssembly, running directly in the browser.
- What it does: Lets you view, edit, and interact with raw PDF documents directly—no pre-conversion required. It supports all advanced PDF features like annotations, form filling, digital signatures, and more.
- The
pdfnet: trueflag you saw in initialization is explicitly telling WebViewer to use this engine for PDF handling. Even when you includewebviewer.js, setting this flag ensures the core processing logic is powered by PDFNetJS instead of fallback layers.
2. XOD Format Backend
- XOD is PDFTron's optimized, web-friendly document format. It works by converting source documents (PDFs, Word docs, Excel sheets, images, etc.) into a split, streamable format on your server first.
- Here, the "backend" refers to WebViewer's dedicated processing layer for loading and rendering XOD files. This approach extends support beyond just PDFs to a wide range of document types, and offers faster load times for large files since it streams content in chunks.
To sum it up: The "backend" here is just the core engine WebViewer uses to parse and display your documents—either directly handling PDFs with PDFNetJS, or working with pre-converted XOD files to support more formats.
内容的提问来源于stack exchange,提问作者Saranya
相关产品推荐
相关产品推荐

