53 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
47
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
102
views
dispatcher.useInsertionEffect error with react-pdf/renderer and Chakra UI
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/...
1
vote
0
answers
102
views
Getting blank pdf after downloading with @react-pdf/renderer library
I have use @react-pdf/renderer library to download map in pdf.
import html2canvas from "html2canvas";
import {
PDFDownloadLink,
Page,
Text,
View,
Document,
Image,
} ...
0
votes
1
answer
184
views
Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
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/...
1
vote
0
answers
189
views
@react-pdf/renderer how to build for node when using renderToStream
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 ...
0
votes
1
answer
198
views
@react-pdf/renderer can't use fonts when building for node
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 ...
0
votes
2
answers
642
views
How to pass props to react-pdf/renderer renderToStream function?
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, ...
-2
votes
1
answer
977
views
why do I get this error BindingError: Expected null or instance of Config,...act-pdf/renderer/lib/react-pdf.browser.js:4268:9
TLDR: Why do I get error of this, whenever I'm about to generate my pdf?
app-index.js:33 TypeError: Cannot read properties of null (reading 'write')
at PDFDocument.addContent (pdfkit.browser.js:...
0
votes
0
answers
68
views
I can't insert a pdf into next js
import React, { useState } from 'react';
import ReactDOM from "react-dom";
import HTMLFlipBook from "react-pageflip";
import { pdfjs, Document, Page as ReactPdfPage } from "...
0
votes
1
answer
402
views
Opening a PDF in a Blob Instead of a PDF Preview Component
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, ......
-1
votes
1
answer
134
views
How to disable copying text from the pdf rendered by @react-pdf/renderer?
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 ...
0
votes
1
answer
2k
views
How to Display an Image Only on the First Page Using @react-pdf/renderer?
I'm working on a PDF generation feature using the @react-pdf/renderer package in my React application. I need to display an image only on the first page of the PDF. Below is the relevant portion of my ...
0
votes
1
answer
432
views
Text styling ignored in react-pdf/render
I'm using (or trying to use) react-pdf/renderer to generated formatted PDF output for a React project. I can get the output; but it's not formatted.
I assume I'm doing something wrong, but I'm ...
1
vote
0
answers
856
views
React Pdf don't show image
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 ...
0
votes
1
answer
337
views
React pdf render maximum item per page
I am trying to create a function to generate a pdf with a list of qr code. The number of qr code can be many, so I wish to limit there is maximum 9 qr code and 3 qr code in a row. What should I do to ...