Support

Client-side
Server-side

Preview

Set the page ratio and margin sizes in px. You can also use the @page at-rule in CSS to manage all aspects of printed pages. More on this here.

1import { Margins } from "@fileforge/react-print";
2
3<React.Fragment>
4 <CSS>{`body{background-color:lightblue}`}</CSS>
5 <Margins pageRatio="A4" top="100" right="100" left="100" bottom="100" />
6 <div>Hello world!</div>
7</React.Fragment>;

Examples