113
questions
1
vote
0
answers
17
views
Module '"pdfjs-dist"' has no exported member 'PDFViewerParams'. error when trying to upgrade pdfjs-dist from version 2.5.207 to 4.6,x
Error: Module not found: Error: Can't resolve 'pdfjs-dist/build/pdf.worker.entry' in 'module\src\lib\components\pdf\render'
Error: pdf-render.component.ts:5:41 - error TS2305: Module '"pdfjs-...
0
votes
0
answers
40
views
Angular. Pdfjs-dist worker. Problem in deployed production enviroment
I need to use pdf library pdfjs-dist. I set up worker like this:
PDF.GlobalWorkerOptions.workerSrc = 'pdf.worker.mjs';
and in angular.json like this:
{
"glob": "pdf.worker.*",
...
0
votes
1
answer
89
views
How can I display pdf file content with toolbar and sidebar in pdfjs-dist library [duplicate]
enter image description here
I want to show pdf content with toolbar as above, but it's only show pdf, How can I configuration to show the toolbar?
that's my step:
I install pdfjs-dist: npm i pdfjs-...
0
votes
0
answers
28
views
How to highlight several key sentences at a time in pdf renderded by pdfjs in vue project?
In the pdf rendered by the pdfjs module in the vue project, displayed by calling iframe inside the template, I am trying to highlight several key sentences returned by the back-end at the same time or ...
2
votes
1
answer
174
views
PDF.js in Vite library - Failed to fetch dynamically imported module
I have created a custom PDF viewer component in a Vue/Quasar Vite project, which is being built as a library. When using the library on local, everything works completely fine. However when deployed ...
1
vote
1
answer
201
views
Error related to pdf.worker.min says 'import', and 'export' cannot be used outside of module code
I am getting this error when pushing a build to Vercel:
Failed to compile.
static/media/pdf.worker.min.50acc843.mjs from Terser
x 'import', and 'export' cannot be used outside of module code
,-[...
0
votes
1
answer
99
views
Zoom pdf.js on mobile view browser
I created a pdf display on the web with pdf.js and it worked normally, the pdf appeared and I could click next and previous, but when the mobile pdf display became small, I couldn't change the ...
3
votes
2
answers
387
views
Unable to load pdfjs-dist library in Angular but same thing working in JS
I'm using pdfjs-dist library to simply show pdf on canvas.
Firstly I've tried it in JS, which is working perfectly fine using Open Live Server.
I have downloaded pdfjs-dist using command npm install ...
0
votes
0
answers
109
views
PDFjs rendering greyscale on Safari
i've been having lots of trouble with PDF js, especially on Safari. I've tried to switch to use the legacy version, but now on my test site, it just displays a blank canvas. But locally it works fine?
...
1
vote
1
answer
208
views
Parsing of text from Pdf in reactjs
I'm using the pdf.js library to extract text from PDF files, but the extracted text isn't formatted correctly, with some lines ending up at the end. The PDF file usually contains a resume, and since ...
0
votes
1
answer
654
views
ng2-pdf-viewer and pdfjs-dist
In angular 15.2.9 application I am using ng2-pdf-viewer , pdfjs-dist for loading and edit a Pdf.
I am using "ng2-pdf-viewer": "^9.1.5" version.
I want suitable version of pdfjs-...
0
votes
0
answers
58
views
I have issue with Memory limit exceeded
I have make a function that read & write PDF using pdf-lib.js, pdfjs-dist package. first my memory limit is 2GB and got error Memory limit exceeded, after I try to increase cloud memory to 4GB but ...
14
votes
2
answers
11k
views
pdf.js pdfjs-dist Promise.withResolvers is not a function
I'm trying to extract data from pdf files and return it. here's the code in the serverside in astro
import * as pdfjsLib from "pdfjs-dist";
pdfjsLib.GlobalWorkerOptions.workerSrc = "../....
0
votes
0
answers
61
views
Stamp in pdf draggable in html?
I need to create a stamp to mark a signature area, I need to add an HTML element that shows me the x and y position, and the element can be dragged between pages, has anyone already implemented this ...
1
vote
2
answers
1k
views
Using pdfjs in Sveltekit/Typescript
I need to use pdfjs (current 4.1.392) for text extraction in a sveltekit 4 typescript project. This is how I try to import pdfjs into my src/routes/+page.svelte:
<script lang="ts">
...