Skip to content

Commit

Permalink
docs: add example project section in README
Browse files Browse the repository at this point in the history
- change prettier config line width
- apply updated lint rule
  • Loading branch information
Jaewoook committed Dec 22, 2024
1 parent 71d3a4e commit 5e6d0c5
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ module.exports = {
es2021: true,
node: true,
},
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
],
overrides: [
{
env: {
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"printWidth": 120,
"printWidth": 100,
"singleQuote": false,
"trailingComma": "es5",
"semi": true
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ yarn add pdfium.js
npm install --save pdfium.js
```

## Example project

Check out this example project. The implemantion of renderer may helpful to achieve what you do.

![example project](./images/example_project.png)

## Usage

> [!NOTE]
Expand Down
Binary file added images/example_project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 13 additions & 2 deletions src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ export interface FPDF extends ModuleOptions {
_FPDF_GetPageHeight: (pagePtr: number) => number;
_FPDF_GetPageWidthF: (pagePtr: number) => number;
_FPDF_GetPageHeightF: (pagePtr: number) => number;
_FPDF_GetPageSizeByIndex: (documentPtr: number, pageIndex: number, width: number, height: number) => number;
_FPDF_GetPageSizeByIndex: (
documentPtr: number,
pageIndex: number,
width: number,
height: number
) => number;
_FPDF_ClosePage: (pagePtr: number) => void;
// Page Object
_FPDFPage_CountObjects: (pagePtr: number) => number;
Expand All @@ -53,7 +58,13 @@ export interface FPDF extends ModuleOptions {
_FPDFText_ClosePage: (textPagePtr: number) => void;
// Bitmap
_FPDFBitmap_Create: (width: number, height: number, alpha: number) => number;
_FPDFBitmap_CreateEx: (width: number, height: number, format: number, firstScan: number, stride: number) => number;
_FPDFBitmap_CreateEx: (
width: number,
height: number,
format: number,
firstScan: number,
stride: number
) => number;
_FPDFBitmap_FillRect: (
bitmapPtr: number,
left: number,
Expand Down

0 comments on commit 5e6d0c5

Please sign in to comment.