Questions related to the npm package react-to-print
Questions tagged [react-to-print]
44 questions
1
vote
1 answer
how to set A5 page size in react-to-print
I usually use react-to-print for printing react components with a low effort and great flexibility. I want to set page size in my react-project.
This is my code:
const Invoice = (props) => {
var clientInfo =…

user14646450
- 1
- 1
- 3
0
votes
0 answers
In multiple image print one image per page on many pages
I just occur one problem that i want to create invoice but when invoice get item image than it break A4 size so i want to print that if item have image than i want to print a only single product per page so like if i have 3 products and two of them…

Mohan Dhila
- 21
- 1
0
votes
0 answers
reactToPrint library printing generates blurry images. I am using a thermal printer to print the contents using react.js
I have been trying to figure this out to make the printing text clear using reactToPrint library, but it's coming as blurry.
I have tried making font changes(font face, style etc) but none of them seems to work.
I have tried subpixel-antialiasing…

Santanu
- 893
- 3
- 10
- 24
0
votes
0 answers
Improving print quality from React app to dot matrix printer
I am working on a React app where I use the "react-to-print" library to print content to a dot matrix printer. However, when I print from the React app, the text is printed in bold letters on the dot matrix printer, resulting in poor print quality.…
0
votes
1 answer
How can I trigger React-to-Print using the print option in the context menu?
I have a React component that displays a table and I am using the React-to-Print library to enable printing functionality. Currently, the printing is triggered by a button click, but I would like to enhance the user experience by allowing them to…

Nok13
- 1
0
votes
0 answers
Page header and content is overlaping while printing in react. using react to print
I want to print a page, that overlaps page header with page content, also Page number not working. i am using react-to-print. And below css for styling
I want to print a page with page number without any overlapping and proper page breaking.
Here…

Shameer Ahmed
- 1
- 2
0
votes
0 answers
react-to-print gives empty screen for printing
I am working on an ionic react application. clicking on Print this out! taking me to the print screen. But getting an empty screen to print.
My Print Component:
import React, { useRef } from 'react';
import ReactToPrint from…
0
votes
2 answers
keydown event not getting caught in react unless I cause a re-render
I'm trying to print specific components of my app using react-to-print library. I'm trying to override the event of pressing ctrl+p for printing by using event.preventDefault() and it's working for the first time that is when the app renders, on…

Rahul Mallick
- 51
- 4
0
votes
1 answer
Custom footer with ReactToPrint
I'm trying to print my custom React functional component (save as PDF) by using ReactToPrint package. So far everything goes fine, until I wanted to modify Footer of document in print dialog (see picture). Basically I just want to get rid of whole…

Juraj
- 1
- 2
0
votes
0 answers
I have a problem with react-print not printing the dimensions i want
So i have a resume creator app and when the user is finished he can store his resume in pdf. It works pefectly in a wide screen like a monitor but on a phone it doesn't.Now that happens because i have made the Resume look differently when a user is…

Jay
- 19
- 2
0
votes
0 answers
How to enable print in React application where page rendered as section under
I have enabled react-to-print module,
import { useReactToPrint } from "react-to-print";
In the present code from App.jsx, main-presenter.jsx is been invoked.
import MainPresenter, {FLOW_PATH, MEMBER_HOME} from './presenters/main-presenter';
And in…

Dev Anand Sadasivam
- 699
- 7
- 21
- 49
0
votes
1 answer
react-to-print Page numbers Display
const handlePrint = useReactToPrint({
content: () => currentRef,
pageStyle: `
@page {
size: auto;
margin: 11mm 17mm 17mm 17mm;
@top-right-corner {
content: "Page " counter(page);
}
}`,
…

Ashan
- 31
- 7
0
votes
0 answers
trying to print duplicated component with react-to-print
I have a component that I'm trying to print using react-to-print, is there any way I can print this component duplicated in one page?
here is my code:
import React, {useRef} from 'react';
import { useReactToPrint } from 'react-to-print';
import…

Houssam Mrabet
- 21
- 6
0
votes
1 answer
ReactJS : React-to-print & Navigate : Uncaught TypeError: (0 , react__WEBPACK_IMPORTED_MODULE_1__.useRef) is not a function
I try to do a sort of "go back" action. I have a page that is the preview of what I want to print with react-to-print. Everything works perfectly : components appears, when I click on "print" it works.
But when I want to click "retour" (go back) I…

Aliénor
- 95
- 9
0
votes
0 answers
how to make useReactToPrint get the last update(state)
I want to print the facture of selling , for that i used useReactToPrint but the problem is that it takes the last update of my values, for example if i add two numbersin the selling price field it only shows the first one in the print pdf page, i…

Isra_Yas
- 33
- 3