Skip to content

Commit

Permalink
docs: split learned knowledge
Browse files Browse the repository at this point in the history
  • Loading branch information
Priestch committed Sep 22, 2023
1 parent e1d8a48 commit 4926a4c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const config = {
{
text: "Learn PDF.js",
items: [
{ text: "Learned Knowledge", link: "/learned-knowledge" },
{ text: "Learned Knowledge", link: "/learned-knowledge/" },
{ text: "Architecture", link: "/architecture" },
{ text: "Common Pitfalls", link: "/pitfalls" },
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# Acknowledge

> This is all I learned from the PDF.js. It may not be accurate, but I hope it can help you to understand the PDF.js better.
## AppOptions
# AppOptions

There are dozens of times options in PDF.js, and they all belong to four kinds for now. You may wonder why there are so many options, and what they mean at the first time. This document will help you to understand them.

Expand Down
4 changes: 4 additions & 0 deletions docs/learned-knowledge/application.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# PDFViewerApplication

The global `PDFViewerApplication` object is the entry of the default viewer of PDF.js, it glues all the modules
together, and provides the API for the user.
29 changes: 29 additions & 0 deletions docs/learned-knowledge/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Acknowledge

> There are critical comments about the PDF.js project, they say it should be easier to integrate the default
> viewer. I understand them somehow as a developer who want to show a PDF quickly, but knowing the primary goal
> of an OSS project can help us to understand the trade-off decisions made by the maintainers.
>
> All these are what I learned from the PDF.js project. It may not be accurate, but I hope it can help you to understand the PDF.js better.
## Table of Contents

### Background Introduction

[PDF.js](https://github.com/mozilla/pdf.js) is an OSS project supported by Mozilla and developed using HTML5,
It's goal is to create a general-purpose, web standards-based platform for rendering PDFs in the **Firefox browser**. Many people find out that it's hard to integrate it into project, it's [somehow intentionally](#issues-talked-about-why-it-s-hard-to-integrate).

It's not developed as a component or library you can easily integrate like most npm packages, because it's
primary goal is to be used easily in **Firefox browser**, the goal doesn't match most developers expectations.
It's the trade-off decision made by the maintainers, we should respect it.

### Issues talked about why it's not easy to integrate

- [Issue 5609](https://github.com/mozilla/pdf.js/issues/5609#issuecomment-68530552)
- [Issue 9210](https://github.com/mozilla/pdf.js/issues/9210#issuecomment-347834276)
- [Issue 7203](https://github.com/mozilla/pdf.js/issues/7203#issuecomment-210510569)

## The Terms

- [AppOptions](./app-options)
- [PDFViewerApplication](./application)

0 comments on commit 4926a4c

Please sign in to comment.