[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-632":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},632,"pdf.js","mozilla\u002Fpdf.js","mozilla","PDF Reader in JavaScript","https:\u002F\u002Fmozilla.github.io\u002Fpdf.js\u002F",null,"JavaScript",53432,10629,1093,375,0,9,32,157,36,45,"Apache License 2.0",false,"master",true,[],"2026-06-12 02:00:16","# PDF.js [![CI](https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fpdf.js\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg?query=branch%3Amaster)](https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fpdf.js\u002Factions\u002Fworkflows\u002Fci.yml?query=branch%3Amaster) [![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fmozilla\u002Fpdf.js\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fmozilla\u002Fpdf.js)\n\n[PDF.js](https:\u002F\u002Fmozilla.github.io\u002Fpdf.js\u002F) is a Portable Document Format (PDF) viewer that is built with HTML5.\n\nPDF.js is community-driven and supported by Mozilla. Our goal is to\ncreate a general-purpose, web standards-based platform for parsing and\nrendering PDFs.\n\n## Contributing\n\nPDF.js is an open source project and always looking for more contributors. To\nget involved, visit:\n\n+ [Issue Reporting Guide](https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fpdf.js\u002Fblob\u002Fmaster\u002F.github\u002FCONTRIBUTING.md)\n+ [Code Contribution Guide](https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fpdf.js\u002Fwiki\u002FContributing)\n+ [Frequently Asked Questions](https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fpdf.js\u002Fwiki\u002FFrequently-Asked-Questions)\n+ [Good Beginner Bugs](https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fpdf.js\u002Fissues?q=is%3Aissue%20state%3Aopen%20label%3Agood-beginner-bug)\n+ [Projects](https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fpdf.js\u002Fprojects)\n\nFeel free to stop by our [Matrix room](https:\u002F\u002Fchat.mozilla.org\u002F#\u002Froom\u002F#pdfjs:mozilla.org) for questions or guidance.\n\n## Getting Started\n\n### Online demo\n\nPlease note that the \"Modern browsers\" version assumes native support for the\nlatest JavaScript features; please also see [this wiki page](https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fpdf.js\u002Fwiki\u002FFrequently-Asked-Questions#faq-support).\n\n+ Modern browsers: https:\u002F\u002Fmozilla.github.io\u002Fpdf.js\u002Fweb\u002Fviewer.html\n\n+ Older browsers: https:\u002F\u002Fmozilla.github.io\u002Fpdf.js\u002Flegacy\u002Fweb\u002Fviewer.html\n\n### Browser Extensions\n\n#### Firefox\n\nPDF.js is built into version 19+ of Firefox.\n\n#### Chrome\n\n+ The official extension for Chrome can be installed from the [Chrome Web Store](https:\u002F\u002Fchrome.google.com\u002Fwebstore\u002Fdetail\u002Fpdf-viewer\u002Foemmndcbldboiebfnladdacbdfmadadm).\n*This extension is maintained by [@Rob--W](https:\u002F\u002Fgithub.com\u002FRob--W).*\n+ Build Your Own - Get the code as explained below and issue `npx gulp chromium`. Then open\nChrome, go to `Tools > Extension` and load the (unpackaged) extension from the\ndirectory `build\u002Fchromium`.\n\n### PDF debugger\n\nBrowser the internal structure of a PDF document with https:\u002F\u002Fmozilla.github.io\u002Fpdf.js\u002Finternal-viewer\u002Fweb\u002Fdebugger.html\n\n## Getting the Code\n\nTo get a local copy of the current code, clone it using git:\n\n    $ git clone https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fpdf.js.git\n    $ cd pdf.js\n\nNext, install Node.js via the [official package](https:\u002F\u002Fnodejs.org) or via\n[nvm](https:\u002F\u002Fgithub.com\u002Fcreationix\u002Fnvm). If everything worked out, install\nall dependencies for PDF.js:\n\n    $ npm install\n\nFinally, you need to start a local web server as some browsers do not allow opening\nPDF files using a `file:\u002F\u002F` URL. Run:\n\n    $ npx gulp server\n\nand then you can open:\n\n+ http:\u002F\u002Flocalhost:8888\u002Fweb\u002Fviewer.html\n\nPlease keep in mind that this assumes the latest version of Mozilla Firefox; refer to [Building PDF.js](https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fpdf.js\u002Fblob\u002Fmaster\u002FREADME.md#building-pdfjs) for non-development usage of the PDF.js library.\n\nIt is also possible to view all test PDF files on the right side by opening:\n\n+ http:\u002F\u002Flocalhost:8888\u002Ftest\u002Fpdfs\u002F?frame\n\n## Building PDF.js\n\nIn order to bundle all `src\u002F` files into two production scripts and build the generic\nviewer, run:\n\n    $ npx gulp generic\n\nIf you need to support older browsers, run:\n\n    $ npx gulp generic-legacy\n\nThis will generate `pdf.js` and `pdf.worker.js` in the `build\u002Fgeneric\u002Fbuild\u002F` directory (respectively `build\u002Fgeneric-legacy\u002Fbuild\u002F`).\nBoth scripts are needed but only `pdf.js` needs to be included since `pdf.worker.js` will\nbe loaded by `pdf.js`. The PDF.js files are large and should be minified for production.\n\n## Using PDF.js in a web application\n\nTo use PDF.js in a web application you can choose to use a pre-built version of the library\nor to build it from source. We supply pre-built versions for usage with NPM under\nthe `pdfjs-dist` name. For more information and examples please refer to the\n[wiki page](https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fpdf.js\u002Fwiki\u002FSetup-pdf.js-in-a-website) on this subject.\n\n## Including via a CDN\n\nPDF.js is hosted on several free CDNs:\n - https:\u002F\u002Fwww.jsdelivr.com\u002Fpackage\u002Fnpm\u002Fpdfjs-dist\n - https:\u002F\u002Fcdnjs.com\u002Flibraries\u002Fpdf.js\n - https:\u002F\u002Funpkg.com\u002Fpdfjs-dist\u002F\n\n## Learning\n\nYou can play with the PDF.js API directly from your browser using the live demos below:\n\n+ [Interactive examples](https:\u002F\u002Fmozilla.github.io\u002Fpdf.js\u002Fexamples\u002Findex.html#interactive-examples)\n\nMore examples can be found in the [examples folder](https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fpdf.js\u002Ftree\u002Fmaster\u002Fexamples\u002F). Some of them are using the pdfjs-dist package, which can be built and installed in this repo directory via `npx gulp dist-install` command.\n\nFor an introduction to the PDF.js code, check out the presentation by our\ncontributor Julian Viereck:\n\n+ https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=Iv15UY-4Fg8\n\nMore learning resources can be found at:\n\n+ https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fpdf.js\u002Fwiki\u002FAdditional-Learning-Resources\n\nThe API documentation can be found at:\n\n+ https:\u002F\u002Fmozilla.github.io\u002Fpdf.js\u002Fapi\u002F\n\n## Questions\n\nCheck out our FAQs and get answers to common questions:\n\n+ https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fpdf.js\u002Fwiki\u002FFrequently-Asked-Questions\n\nTalk to us on Matrix:\n\n+ https:\u002F\u002Fchat.mozilla.org\u002F#\u002Froom\u002F#pdfjs:mozilla.org\n\nFile an issue:\n\n+ https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fpdf.js\u002Fissues\u002Fnew\u002Fchoose\n","PDF.js 是一个使用 HTML5 构建的 PDF 文件阅读器。它能够解析和渲染 PDF 文档，并且完全基于 Web 标准技术，无需任何浏览器插件支持。该项目的核心功能包括跨平台兼容性、高质量的文档渲染以及通过 JavaScript 实现的高效解析算法。此外，PDF.js 支持现代及老旧浏览器版本，确保了广泛的可用性。Mozilla 官方维护并将其集成到了 Firefox 浏览器中，同时也有适用于 Chrome 的扩展程序。适合需要在网页应用中直接嵌入 PDF 查看功能的各种场景，如在线教育平台、文档管理系统等。",2,"2026-06-11 02:38:13","top_all"]