A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/MatthewHerbst/react-to-print/issues/343 below:

Page Styles not Printing at all · Issue #343 · MatthewHerbst/react-to-print · GitHub

Hi, I'm using React.Bootstrap for styling my custom component.
Then, when printing such component from clicking a button, I'm getting the page to print without most of styles applied(Ex. rows, columns...).

Pleasee help me with this, I really need to make this work and I have already tried multiple approaches (without success) until I found this library.

Below a quick summary of my implementation:

import PrintAgreementForm from "./PrintAgreementForm";

<ReactToPrint
  trigger={() => (
    <Button variant="primary" className="mr-2" onClick={this.handlePrint}>
      Print
    </Button>
  )}
  content={() => this.componentRef}
/>
<div style={{ display: "none" }}>
  <CustomComponent ref={(el) => (this.componentRef = el)} />
</div>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4