447
questions
0
votes
0
answers
17
views
how to recover the history scroll position when using VariableSizeList
I am using a React window "react-window": "^1.8.10" to render some PDF pages, this is what the code looks like:
const renderPdfList = () => {
if (pdf && pageViewports) ...
0
votes
0
answers
20
views
403 Forbidden error, while rendering Pdf using react-pdf and Uploadthings to store pdf
enter image description here
this is the core.ts
import { db } from "@/db";
import { getKindeServerSession } from "@kinde-oss/kinde-auth-nextjs/server";
import { createUploadthing, ...
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 ...
0
votes
0
answers
24
views
fix the pdf flash with many pages when using react-pdf
I am using react-pdf version 9.0.1 to show latex compiled pdf in react(version 18) project, and working with the flash issue when scale pdf followed by this issue https://github.com/wojtekmaj/react-...
-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 ...
0
votes
0
answers
47
views
How to render specific pages (not entire PDF file) using react-pdf?
I am working on a React project for displaying pdf file as a flipbook using Nextjs and react-pageflip.
'use client'
import { useResizeObserver } from '@wojtekmaj/react-hooks'
import {
ForwardedRef,
...
0
votes
1
answer
147
views
Rendering Large PDFs in Chunks Using React-PDF (PDF.js)
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 ...
0
votes
0
answers
35
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 "...
1
vote
1
answer
147
views
Expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream". when upgrade react pdf to 9.x
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 ...
0
votes
0
answers
22
views
How to Implement Safe Exam Browser (SEB) in a Next.js or React.js Application?
I'm working on a web application using Next.js and React.js, and I need to ensure that PDF files are opened within Safe Exam Browser (SEB) rather than standard browsers like Google Chrome. SEB ...
0
votes
0
answers
64
views
Failed to load PDF File - react PDF
I am trying to view a pdf file the I am gonna get from an API, the API will return a pdf file, and then i am gonna process it as a blob so that the user can download it after viewing it, but I am ...
0
votes
0
answers
48
views
Image is rendered in white rather than the actual image using react-pdf in node.js
I am having a problem with showing images in my pdf generator that I am using @react-pdf/renderer, I switching the process of creating the PDF from client-side to server-side to reduce the load on the ...
0
votes
1
answer
75
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, ......
0
votes
0
answers
60
views
PDF created with react-pdf opened in new tab gives "Check Internet Connection" error when click download
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={...
0
votes
0
answers
114
views
How to maintain code layout in PDF using jsPDF in React.js?
I am trying to generate a PDF that replicates the layout of my code using jsPDF in JavaScript. Previously, I attempted using html2canvas, but it converts the code layout into an image, resulting in ...