Skip to main content
-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 votes
1 answer
37 views

How to preserve image colors on inverted pdf document using PDF.js and CSS?

My goal is to read the PDF file through the PDF.js library and display the PDF in a dark mode with black background and white text and preserve the original state of the images from the document. With ...
2kdm's user avatar
  • 1
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
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.*", ...
Raziel's user avatar
  • 120
0 votes
0 answers
36 views

how to avoid the fisrt http request load the whole pdf when using range request with pdf.js

I am trying to use the pdf.js range request to load a huge pdf, but now I found the range request works but the first request load the whole pdf. From the official document is told that the range ...
Dolphin's user avatar
  • 36.7k
0 votes
1 answer
88 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
-2 votes
0 answers
32 views

Jest tests crashes by react-pdf

What I have: node 14.21.3 react-pdf 7.3.3 When I run jest tests I have that problem (but not in all tests what's surprising): ● Test suite failed to run Jest encountered an unexpected token Jest ...
Oleg Smirnov's user avatar
0 votes
0 answers
16 views

2012 Mozilla pdf.js- Preventing window.history.replaceState in pdf.js from Reloading State in AngularJS App

I am working on an AngularJS application that integrates with pdf.js to display PDF documents. However, I'm encountering an issue where pdf.js calls window.history.replaceState, which in turn causes ...
guy cohen's user avatar
0 votes
0 answers
33 views

Warning: loadFont - preEvaluateFont failed: "XRefEntryException: Bad (uncompressed) XRef entry: 4695R"

I am using pdf.js(version 4.4.168) in browser to show some pdf. This is the typescript code look like( using react-pdf "react-pdf": "^9.1.0"): <div id="pdfContainer&...
Dolphin's user avatar
  • 36.7k
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
2 votes
1 answer
173 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 ...
Foursee's user avatar
  • 23
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
0 votes
0 answers
36 views

How to download editable PDF using pdf.js

I use the pdf.js library to display the pdf files that come from the server, and the problem I have is that when we click on the print button and want to save the file as a pdf, after saving the pdf, ...
Amir7222's user avatar

15 30 50 per page
1
2 3 4 5
88