Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
with:
version: 8.x
- name: Setup Node.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
with:
version: 8.x
- name: Setup Node.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deprecate-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
deprecate:
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8.x
- uses: actions/setup-node@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.2
uses: pnpm/action-setup@v4
with:
version: 8.x
- name: Checkout
Expand All @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.2
uses: pnpm/action-setup@v4
with:
version: 8.x
- name: Checkout
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## v1.6.2 (10/10/2023)

### Changes

- :arrow_up: update pdfjs-dist to v4.10.38

## v1.6.1 (10/10/2023)

### Changes
Expand Down
Binary file added cypress/downloads/downloads.html
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-mindee-js",
"version": "1.6.1",
"version": "1.6.2",
"description": "Front-End Computer Vision SDK for React",
"author": "@mindee",
"license": "MIT",
Expand All @@ -16,7 +16,7 @@
"@types/utif": "^3.0.1",
"heic2any": "^0.0.4",
"konva": "^8.1.3",
"pdfjs-dist": "2.6.347",
"pdfjs-dist": "4.10.38",
"utif": "^3.1.0",
"uuid": "^8.3.2"
},
Expand Down Expand Up @@ -57,8 +57,8 @@
"cy:prepare": "pnpm build",
"prepare": "ts-patch install -s",
"build": "vite build",
"cy:open": "cypress open --component --browser firefox",
"cy:run": "cypress run --component --browser firefox",
"cy:open": "cypress open --component --browser chrome",
"cy:run": "cypress run --component --browser chrome",
"docs:start": "pnpm --dir ./docs start",
"docs:install": "pnpm --dir ./docs install",
"docs:prepare": "pnpm build && pnpm docs:install",
Expand Down
111 changes: 106 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions src/utils/getImagesFromPDF.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { getDocument, GlobalWorkerOptions, version } from 'pdfjs-dist'
import {
getDocument,
GlobalWorkerOptions,
PDFDocumentProxy,
PDFPageProxy,
RenderParameters,
} from 'pdfjs-dist/types/display/api'
version,
} from 'pdfjs-dist'
import { RenderParameters } from 'pdfjs-dist/types/src/display/api'

import { MAX_PDF_SCALE, PDF_RESOLUTION } from '@/common/constants'

GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${version}/pdf.worker.js`
GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${version}/build/pdf.worker.min.mjs`

const getImageFromPage = async (
_document: PDFDocumentProxy,
Expand Down
Loading