Questions tagged [react-pdf]

React renderer for creating PDF files on the browser and server

409 questions
0
votes
1 answer

React-pdf submit multiple values

I am trying to create a form where you input some values in this case, name and surname and then you generate a pdf. I am using https://react-pdf.org/advanced#on-the-fly-rendering to aid with the task. However, I have only managed to submit one…
Ade N
  • 145
  • 1
  • 1
  • 12
0
votes
1 answer

how can i display a buffer data as Pdf Document in my react app?

I'm trying to display a document file and download it in pdf in React, the document is uploaded it a file I used express-file-upload to do that, but I don't know how to fetch the document and display it in my react app, this is how my data look like…
Riahi Rahma
  • 3
  • 2
  • 5
0
votes
1 answer

PDF file not found but correct location?

I'm trying to display a PDF on a website. I'm using the package react-pdf. My component looks like this: import React from 'react'; import { Document, Page } from 'react-pdf'; export default function Resume() { return (
Ryne
  • 1,195
  • 2
  • 14
  • 32
0
votes
1 answer

Highcharts-React Get Base64 PNG of chart

I'm looking to pass a chart export to a component that specifically requires PNG or JPG- so an SVG will unfortunately not work. With the help of other SO answers- I was able to get the SVG Base64 using the following code: let link =…
mg2019
  • 191
  • 17
0
votes
1 answer

@react-pdf/renderer unable to use any react components inside that

In reactJS my requirement is to save PDF file of some images, contents, charts and so on. For that when I tested with below programming I unable to use any reactJS components and I can able to only use {Page, Text, View, Document, StyleSheet, Image}…
0
votes
0 answers

@react-pdf/renderer won't render on second time

I'm using @react-pdf/renderer in my current project & I have to use it on my invoice page. I have created an overview of the invoice with sample data to create the pdf using the help of this website. what I want is when I'm clicking the button it…
0
votes
0 answers

How to Print a React Component into PDF?

I have a data entry app created with React with a node express server backed by an SQL database. At the end of data entry the application creates the finalised form(currently coded as a component with HTML & CSS)with the values from the state. On…
Dworo
  • 153
  • 1
  • 4
  • 15
0
votes
1 answer

React-pdf _ Convert into svg for preview

React pdf PDFViewer generates iframe for the preview of the doc. However, on the original site of react-pdf.org, they display it in svg which is quite nice. Any idea, how to do it?
0
votes
1 answer

react-pdf - Error: Target container is not a DOM element

I am using React with react-pdf and trying to render a PDF into my modal. However, my modal gets loaded on a button click, so it's not loaded on app load. But it is trying to call the PDF rendering call on app load and thus generating the error:…
dmikester1
  • 1,374
  • 11
  • 55
  • 113
0
votes
2 answers

Unable to display pdf file using react-pdf

I am trying to load a pdf file into my project, but I am unable to see it. It just keeps showing 'Loading PDF...' I have added pdfjs web-worker as mentioned in some of their github repo issues, but still no change. I tried building the page by…
arvir
  • 101
  • 1
  • 10
0
votes
1 answer

ReactJS : Fetch response not returning to componentDidMount; Failed to load PDF

In ReactJS, component not re-rendering after receiving Fetch response. So always seeing "Loading PDF..." message in screen componentDidMount code is given below, componentDidMount() { const {getData} = this.props; let data = …
user3362908
  • 433
  • 5
  • 16
0
votes
1 answer

react-pdf-js throwing unhandled proise exception on IE11

I am using react-pdf-js "^4.0.2", with "react": "^15.6.1", the plugin is working fine on chrome, firefox and IE edge. But it is throwing network error and unhandled promise rejection errors on IE 11. Since this is third party plugin i installed…
0
votes
0 answers

Providing correct path for React-PDF

I'm trying to use React-PDF to display a pdf within my component but cannot figure out how to provide it with the correct path for my pdf. my file is located under ReactApp/public/pdf/myPdf.pdf this is where I'm putting my path:
AnKing
  • 1,994
  • 6
  • 31
  • 54
0
votes
0 answers

react-pdf doesnt work on my app , doesnt show my pdf

I am not sure what i am doing wrong since i followed the guide for react-pdf to the point.I believe I am not importing the pdf in the right way because I dont see anythign in my app. here is the code import { Document, Page } from…
sod.heretic
  • 126
  • 1
  • 13
0
votes
1 answer

react-pdf onItemClick is not working

I am using react-pdf to show the pdf document. left i am showing pages preview when we click on the page i am showing the page content in the seperate section. For that i am using onItemClick event. But which is not getting triggered. Below is the…
Lakshmi Prasanna
  • 440
  • 4
  • 16
1 2 3
27
28