Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
133 views

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....
Dolphin's user avatar
  • 40.8k
0 votes
0 answers
84 views

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, ...
KINETIC's user avatar
  • 33
0 votes
0 answers
40 views

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 ...
BINARY TECH's user avatar
0 votes
0 answers
145 views

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 (...
Sridivya_pulapa's user avatar
0 votes
1 answer
86 views

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): ...
Arnav Sharma's user avatar
0 votes
1 answer
205 views

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 ...
Evanss's user avatar
  • 22.5k
0 votes
4 answers
2k views

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 ...
J_P's user avatar
  • 190
0 votes
0 answers
265 views

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); // ...
gene b.'s user avatar
  • 12.6k
0 votes
1 answer
154 views

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 ...
Zephyr's user avatar
  • 2,651
0 votes
0 answers
58 views

Endpoint: [HttpGet("GetFileStream/{id}")] [Produces("application/octet-stream")] public async Task<Stream> GetFile(int id) { Stream stream = await Services.FileStorage....
Thomas's user avatar
  • 43
0 votes
1 answer
96 views

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 { ...
Bawenang Rukmoko Pardian Putra's user avatar
3 votes
0 answers
904 views

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 ...
Chirag's user avatar
  • 21
0 votes
2 answers
590 views

const Template1 = ({ data }) => { const styles = StyleSheet.create({ page: { position: "relative", }, watermarkContainer: { position: "absolute", ...
Dhamodharan B's user avatar
0 votes
0 answers
96 views

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 ...
Rao Imtinan's user avatar
-1 votes
1 answer
236 views

I am working on a React application and I need to display a preview of an XFA-based PDF file. However, I'm running into issues when trying to render the PDF in the browser. Below are the details of my ...
Himanshu's user avatar
0 votes
1 answer
50 views

I am trying to render inside a PDF an SVG that displays LaTeX. The SVG has been generated using MathJax. The issue is that the rendered PDF has the Path elements from the SVG malformed. It changes the ...
Romen Medina Beltrán's user avatar
0 votes
0 answers
93 views

I am trying to use react-pdf in my app and I have downloaded a code from github for integrating react-pdf in my project. This is working fine and showing the pdf but the size of the pdf is not the ...
Hasan Zubairi's user avatar
0 votes
0 answers
97 views

I want to download a Chakra UI component with @react-pdf/renderer Copying some code from react-pdf's documentation, I have this: import "./App.css"; import Header from "./components/...
Aaron's user avatar
  • 55
0 votes
0 answers
93 views

I am using react-pdf to view pdf in my Next.js web app: https://www.npmjs.com/package/react-pdf When I am trying to acces my pdfs that I have on cloud using url, I am getting error: Failed to fetch ...
jakarta2000's user avatar
2 votes
1 answer
347 views

I am generating PDFs in my project using libraries such as @react-pdf/renderer and pdf-lib, and I am encountering significant challenges with font compatibility for multilingual text. In my use case, ...
Shahed's user avatar
  • 2,100
2 votes
2 answers
815 views

I’m trying to generate a PDF using @react-pdf/renderer, and I want to directly render the PDF to a Buffer for further processing (e.g., saving it to a file or sending it as an HTTP response). However, ...
hantoren's user avatar
  • 1,359
2 votes
1 answer
125 views

const [numPagesState, setNumPagesState] = useState(0); const allCertificates = formik?.values?.certificate_file || []; {allCertificates?.length > 0 && allCertificates?.map((el) => { ...
Soumil Nimbalkar's user avatar
1 vote
0 answers
179 views

I’m working on a Next.js project that involves displaying PDFs using the react-pdf library. The issue arises on iPhone 13 and older models, where the app crashes after displaying a PDF. The PDF ...
FD3's user avatar
  • 1,996
0 votes
1 answer
176 views

Uncaught TypeError: Cannot read properties of undefined (reading 'prototype') at Object.inherits2 [as inherits] (@react-pdf_renderer.js?v=2aabb8bf:122:50) at ../../node_modules/blob-stream/...
Dinesh Kumar's user avatar
1 vote
0 answers
186 views

I am trying to build (bundle) an app that uses @react-pdf/renderer with vite. Then that bundle will be used in different node express app (like a library). I export some functions that can be used in ...
Oki's user avatar
  • 3,365
0 votes
1 answer
186 views

I am trying to build an app that uses react-pdf/renderer. I will send a pdf response from node js express server. The fonts I use in react-pdf/renderer (.ttf) seems like are fetched via XMLHttpRequest ...
Oki's user avatar
  • 3,365
0 votes
2 answers
198 views

I need to carry some metadata – which could amount to just an ID – from the source HTML, through to the PDF using WeasyPrint, eventually ending up somehow addressable in the HTML rendered by pdf.js (...
serlingpa's user avatar
  • 12.8k
0 votes
2 answers
620 views

I am trying to render a pdf to sent it as an attachment with Resend. This is my test PDF. Basically the one from the docs from react-pdf/renderer but with one testprop added. import { Document, Page, ...
Santi's user avatar
  • 559
3 votes
3 answers
2k views

I've been having a problem with react-pdf in my next js, i've been following multiple tutorial and it seems like still have an error. I get this error ⨯ Instead change the require of react-pdf.js in ...
Stykgwar's user avatar
  • 795
0 votes
0 answers
1k views

I'm trying to render a large PDF file from my S3 storage in chunks using React-PDF (PDF.js). I'm fetching the first 64KB of the PDF with a byte range request, but the PDF fails to load, showing the ...
Omar Ammura's user avatar
0 votes
0 answers
64 views

import React, { useState } from 'react'; import ReactDOM from "react-dom"; import HTMLFlipBook from "react-pageflip"; import { pdfjs, Document, Page as ReactPdfPage } from "...
franzyk's user avatar
  • 11
3 votes
1 answer
8k views

Today when I upgrade the react-pdf https://github.com/wojtekmaj/react-pdf version to 9.1.0, the pdf load failed and shows error: Failed to load module script: Expected a JavaScript module script but ...
Dolphin's user avatar
  • 40.8k
0 votes
1 answer
391 views

I'm currently using BlobProvider to open a PDF document in a new tab as a blob. Here’s the code snippet I’m using: <BlobProvider document={<OrderDocument data={orderData} />}> {({ url, ......
abdo_me's user avatar
  • 11
0 votes
1 answer
200 views

I m using react-pdf to create a PDF and open it in new tab via Link component. WindowTargetAttributes.BLANK = _blank const document = ( <Document> <Page size="A4" style={...
Barış Şahin's user avatar
2 votes
1 answer
571 views

I'm using react-pageflip package with react-pdf. However, the PDF file is not rendered in browser. import React, { useState } from 'react'; import HTMLFlipBook from 'react-pageflip'; import { Document,...
hayatosc's user avatar
-1 votes
1 answer
133 views

Package using for creating pdfs: @react-pdf/renderer I've tried setting an invisible layer over the pdf, but it doesn't work. I've also wrapping the PDFViewer component in a div with userSelect: None ...
sohdata's user avatar
  • 375
0 votes
2 answers
889 views

I'm trying to make a PDF that uses the courier font, but the file doesn't change to it const styles = StyleSheet.create({ text: { fontFamily: "Courier" } }); const MakePDF = ...
Lucas Portela's user avatar
-1 votes
1 answer
205 views

I am using react-pdf for rendering Pdf file and it's working perfectly fine. Below is the code for same: <Document inputRef={documentRef} file={pdfUrl} error=...
Paritosh Mahale's user avatar
0 votes
1 answer
673 views

I'm trying to get base64 images in a variety of formats (gif, png, jpg) to show in react-pdf. {c.images.map((d) => { const prefix = 'data:image/' + d.filename.split('.').pop() + ';base64,' return &...
vLjubovski's user avatar
1 vote
0 answers
853 views

I use the React PDF Image library component and pass an image into it as shown in the documentation and tutorials on YouTube, but the image is not displayed, what could be the problem? To check the ...
Петя Герман's user avatar
0 votes
1 answer
566 views

I have a worker file with the following code import * as Comlink from "https://unpkg.com/comlink/dist/esm/comlink.mjs"; const renderPDFInWorker = async (props) => { try { const { ...
user24892954's user avatar
0 votes
1 answer
1k views

I am building a React Vite Application and using @react-pdf/pdf. I want to add custom font files which are .ttf I import my font files from where they are. The path is correct: import PrometoBold from ...
Gery's user avatar
  • 43
0 votes
1 answer
463 views

I am using pdf-lib in my React TypeScript app. How can I get all the text fields in a PDFDocument with the page number on which that form field is. const getAcroFieldRefs = (pdfDoc) => { if (!...
Shahid Nauman's user avatar
1 vote
0 answers
40 views

It seems that the issue only occurs in the production environment, as fetching the URL and passing it to React-PDF works fine in local and development environments. However, when React-PDF attempts to ...
Sohaib Ashraf's user avatar
1 vote
2 answers
2k views

I'm encountering a problem with my code while attempting to create a PDFViewer component in React (using TypeScript) with the react-pdf library. Despite my efforts, it seems to be failing, and I'm ...
Yasha_ops's user avatar
  • 172
1 vote
0 answers
272 views

I want to render render a pdf which is a lab test which consists of Header(border, logo, hospital address,... etc) and in footer (some text) which has fixed height. Ex layout: Here, the header and ...
Umesh Kumar's user avatar
0 votes
1 answer
112 views

I created next component: import React from 'react'; import { Document, Page, pdfjs } from 'react-pdf'; import 'react-pdf/dist/esm/Page/AnnotationLayer.css'; pdfjs.GlobalWorkerOptions.workerSrc = `//...
Dmytro Kotenko's user avatar
0 votes
1 answer
338 views

I used react-pdf to display a single-page PDF in a ReactJS application. It worked well during the development stage, but after deployment, it stopped working. It says, "Failed to load the pdf&...
user avatar
1 vote
1 answer
115 views

This is going to be a bit of a read but I would love to hear some thoughts. I have a project in NextJs that has a few dependencies, but it's mostly a simple form that stores the data to state and then ...
Eduard Neague's user avatar
1 vote
0 answers
295 views

I am using React-PDF to create PDFs within my React application. My application is set up using RTK Query and works just as expected. However, I am currently implementing my multipage PDF logic. ...
Tim Nikischin's user avatar

1
2 3 4 5
9