Skip to main content

All Questions

Tagged with
-1 votes
0 answers
20 views

JS how to clear the page cache of a pdf document object pdf.js or how not to save it

When I take a page (page = doc.getPage), render it and then clean it (page.cleanup()), the page cache remains in the document object (doc), which accumulates and quickly clogs memory. Tell me, please, ...
Slava's user avatar
  • 1
-1 votes
0 answers
34 views

How can I extract text with coordinates from a PDF using JavaScript? [closed]

I’m working on a project where I need to extract text along with its coordinates from a PDF document using JavaScript. I’m familiar with PDF.js, but I’m unsure how to use it to get the coordinates of ...
Vikram Ray's user avatar
  • 1,164
1 vote
0 answers
52 views

PDF Links Not Clickable When Rendering with pdf.js [closed]

I'm using pdf.js to render a PDF file in the browser. The PDF contains clickable links, but after rendering the file, the links are no longer clickable. Here’s a simplified version of the code I’m ...
user2819411's user avatar
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-...
Tam Ho Chi's user avatar
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 ...
Jacob John's user avatar
0 votes
1 answer
93 views

Saving Annotated PDF Files Using PDF.js

I’ve been working on a project where I need to save a PDF file after annotations have been added using PDF.js. Despite being able to successfully download the file with annotations, I’ve been unable ...
antonnifo's user avatar
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 ,-[...
ytpm's user avatar
  • 5,098
1 vote
1 answer
163 views

How can I make links work in pdf when using PDF.js

I am going of one of their last example, and modified it a bit. The problem that I am facing is that I can't click on any of the links. How would you make it so I can (couldn't find documentation). I ...
Lukas007's user avatar
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 ...
irwan dwiyanto's user avatar
0 votes
0 answers
49 views

how to save/restore/reload stamp annotations , pdf.js / mozilla lib

how to save/restore/reload stamp annotations from my database .. I need to save STAMP_ANNOTATIONS and in Database and reload it when reOpen the the document and and render it will show .. how to ...
Yazan OS's user avatar
0 votes
0 answers
30 views

Print event listeners onafterprint and onbeforeprint work normally but not inside onload

The following code should print a PDF by opening it in a popup window, starting the print dialogue window and closing the popup as soon as the print window is closed. It works as expected in Chrome (...
qarabala's user avatar
  • 178
0 votes
0 answers
48 views

Getthe exact left and top position of the text content using pdf.js

I am developing a pdf editor similar to https://www.sejda.com/. Is there a way to determine the exact to position the text content (left and top)? I am currently using pdf.js to convert the pdf to a ...
fadaco's user avatar
  • 1
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? ...
Dalton's user avatar
  • 11
0 votes
1 answer
306 views

How to highlight multiple words at a single time in pdf file using pdf.js

I am trying to highlight words in the pdf file using pdf.js library. What i want is to highlight words which are not in a sequence format. like a sentence in the pdf file is "text of the printing,...
Sumit T's user avatar
  • 21
0 votes
0 answers
70 views

How can i fix a strict MIME type checking issue related to PDF rendering using PDFJS, nodejs and Firebase Hosting/Storage?

I'm trying to render PDFs stored in Firebase Storage on my website hosted on Firebase Hosting. I'm using webpack to bundle my main files (not the module's one) and NodeJS. When i run the website with ...
Junky-sama's user avatar

15 30 50 per page
1
2 3 4 5
49