Questions related to the npm package react-to-print
Questions tagged [react-to-print]
44 questions
0
votes
1 answer
React to Print is showing blank page in React JS
I am trying to add the print feature on a div's content. But the Print VIewer is showing a blank White page. This is the first time I'm using Print-to-react Library. I am not sure what is the Problem with my code.
let componentRef =…
0
votes
0 answers
React to print fixed footer overlapping contents
I am using a react-to-print library to print some reports that are dynamic. The problem is I need a fixed footer on every page while printing and I have a fixed footer which overlaps the content before going to new page . I know how position:fixed…

Saral Karki
- 4,530
- 2
- 7
- 10
0
votes
0 answers
CodeSanBox Example react-to-print in PC working but laptop not show data
I'm following the example codesanbox with react-to-print :https://codesandbox.io/s/kmmw7l39y7?file=/index.js
The PC working Okay but the laptop not work
I don't now why my laptop is not working
Please help me check it
thanks very much
My PC and…

Nguyen Lam
- 21
- 2
0
votes
1 answer
React passing props (react-to-print)
Hi I have been using this package react-to-print to print document and it works really well. Passing value to child component works and I can print the dynamic data too. However, I am facing problem to pass dynamic data of array list. It always gets…

todd
- 325
- 3
- 15
0
votes
0 answers
how to prevent Dynamic content overlapped on header and footer in React-to-print package
I have an issue that the dynamic HTML content is overwriting on the header and footer. dynamic content is coming from the response of API and I have shown in the component but while printing this PDF the dynamic content is overlapped on the header…

Dhaval Prajapati
- 11
- 1
0
votes
1 answer
ANTD table Print using ReactToPrint component
I am trying to print ANTD table using ReactToPrint hook, everything seems to work fine, but I want to show some text on top of page before print.
means I want to show some text for header purpose, when I am setting the visibility of header component…

Muhammad Faheem Chughtai
- 43
- 1
- 7
0
votes
1 answer
reactjs - show the line only when printing
I have a div in my reactjs which I colored to white. I want to change the color of the line whenever the user tries to print it.
Here is how I've done it.
const useStyles = makeStyles(() => ({
vl: {
borderLeft: "1px solid…

Jc John
- 1,799
- 2
- 34
- 69
0
votes
1 answer
How to make responsive pdf in react js using react-to-print library?
[demo][1]
[1]: https://codesandbox.io/s/react-to-print-rzdhd
I'm using react-to-print library to generate pdf from html. But the problem is that when I try
to generate pdf in my mobile(small screen size), it does not work for me however, it…

Sudip Bhattarai
- 119
- 1
- 8
0
votes
1 answer
Is it possible to get SVG to work well with react-top-print?
Idea is to print pdf documents that I am dislaying in pdfviewer component that I have created. I am getting Uint8Array from the server and that is rendered inside component. All works, so good so far.
Problem starts with implementing printing…

Mladen Milosavljevic
- 1,720
- 1
- 12
- 23
0
votes
3 answers
Downloading to PDF or Preview and Save to PDF/Print using React
I need to know whats the better options between the two:
1st - I call backend to get the JSON response from it and use react-to-print package to preview and save to PDF/Print.
2nd - I call backend to get the JSON response from it and convert and…

Joseph
- 7,042
- 23
- 83
- 181
0
votes
1 answer
How to print the entire page in react-to-print
I have a print button that works great in react-to-print
const handlePrint = useReactToPrint ({
content: () => printRef.current,
});
this will print
My question is how can I print the entire page…
R-S
- 151
- 10
0
votes
0 answers
How to remove nodes from a ref in React
I'm using ref to save the reference to a component that later is printed using react-to-print.
This component contains multiple components as children but not all of them should be printed.
This is the code structure:
import React, { useRef } from…

Jean Pierre
- 281
- 8
- 21
0
votes
0 answers
Why I can't remove white line from bottom of print page
Can someone tell me how can I remove the white line from print page?
print page size is 80x50mm and content size is too
and there is no padding property in the page.
but the page has a white line...
image
css
.App {
font-family: sans-serif;
…

Yongjun Park
- 1
- 1
-1
votes
1 answer
Can you use an export default function, with ReactToPrint?
I am trying to implement ReactToPrint, to print out the contents of the export default function ToDoList (Which returns a map of the Todo cards from another class).
export default function ToDoList({ todos, toggleTodo }) {
return todos.map((todo)…

Skilled Rook
- 171
- 1
- 10