435 questions
-1 votes
0 answers
24 views
Centring pages in ‘react-pdf’ and ensuring they scale properly [closed]
In the image above, I have to start the PDF from the left; otherwise, if I use the centre alignment, it causes horizontal scrolling issues. So I don't want the horizontal scroll to break, and I want ...
0 votes
0 answers
167 views
DOMMatrix is not defined when using react pdf
Today when I using react-pdf(10.2.0) in project, shows error: DOMMatrix is not defined at file:///Users/dolphin/source/reddwarf/frontend/texhub-web-labs/node_modules/pdfjs-dist/build/webpack:/pdf....
0 votes
0 answers
84 views
PDF field misalignment between React-PDF editor and final signed PDF (fields shift down by one field height per placement)
I'm building a custom React-based PDF editor and signer using react-pdf and pdf-lib. The editor (PdfEditor.tsx) lets users drag-and-drop fields (Signature, Email, Date, etc.) on a PDF canvas. Later, ...
0 votes
0 answers
41 views
React-PDF <Image /> not rendering external images from API
I’m building a tenancy agreement generator using react-pdf . Local images stored in my Next.js public/ folder render fine inside , but external images (e.g. from an API or CDN) never show up in the ...
0 votes
0 answers
146 views
React PDF and React PDF Viewer packages version upgradation Issues
I have a React Typescript application. Node version: v16.12.0. Below are the versions of react "react": "^19.1.1", Here there are three packages related to pdf: react-pdf-viewer (...
0 votes
1 answer
86 views
How to highlight the clean citation strings in the PDF document?
Basically, I'm creating an Next app in which the we get the array of strings which is messy we clean it and then we created them into multiple strings: const cleanCitationText = (text: string): ...
0 votes
1 answer
209 views
Deploy Express server to Vercel with ESM dependency?
I have an Express server which uses a ESM dependency react-pdf. I also need the file to be .tsx as I'm using TypeScript JSX for rendering. I have this working locally but I run into issues when trying ...
0 votes
4 answers
2k views
TypeError: Eo is not a function when deleting in React-PDF
I'm trying to generate a PDF based on user input. The user can add, update, and delete items to a list. The list is a redux slice where the state is kept Adding and updating are working but for some ...
0 votes
0 answers
267 views
React-Pdf with configured pdfjs.GlobalWorkerOptions.workerSrc cannot build
I downloaded/installed React-Pdf, "react-pdf": "^9.2.1", I need to show a Byte-Array PDF which is dynamically generated. const response = await createPdf(payload); // ...
0 votes
1 answer
156 views
Render a pdf in react that supports multiple languages and download it
I was using '@react-pdf/renderer' to create a pdf and download it but I could not find a way to support multiple languages with it. That is one pdf file could have strings in multiple languages but ...
0 votes
0 answers
58 views
How to read from .Net Core FileStream in Javascript/Axios?
Endpoint: [HttpGet("GetFileStream/{id}")] [Produces("application/octet-stream")] public async Task<Stream> GetFile(int id) { Stream stream = await Services.FileStorage....
0 votes
1 answer
100 views
ResizeObserver always return the same contentRect
I'm trying to show a PDF in my page by using "react-pdf". I am now struggling with making it responsive. I am now using this custom hook to get the size of the contentRect: import { ...
3 votes
0 answers
918 views
React PDF | TypeError: Cannot read properties of null (reading 'sendWithPromise')
Issue Description I’m encountering an issue with react-pdf where the messageHandler (worker communication channel) is null when rapidly navigating between PDF files. I’ve tried several solutions and ...
0 votes
2 answers
595 views
How to add watermark to every pages in react-pdf
const Template1 = ({ data }) => { const styles = StyleSheet.create({ page: { position: "relative", }, watermarkContainer: { position: "absolute", ...
0 votes
0 answers
99 views
React-PDF: How can I make sure that content flows dynamically to new pages instead of text flow in single page?
I am using the react-pdf package to generate a multi-page PDF document in my React application. However, I am facing issues with dynamically setting margins, borders, and footer styling across ...