# Custom CRM Card - Print Specific Elements

**URL:** <https://community.hubspot.com/t/custom-crm-card-print-specific-elements/89073>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [September 6, 2023, 2:07pm UTC](https://community.hubspot.com/t/custom-crm-card-print-specific-elements/89073 "2023-09-06T14:07:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MIsbrecht](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@MIsbrecht](https://community.hubspot.com/u/MIsbrecht)\
**Post date:** [September 6, 2023, 2:07pm UTC](https://community.hubspot.com/t/custom-crm-card-print-specific-elements/89073/1 "2023-09-06T14:07:30Z")

</div>

I’m fairly certain this is the wrong forum for this question, but I didn’t see a specific crm/dev forum. If there is one and I’m just missing it, please point me in the right direction!

I’m working on a custom card that fetches and displays CRM contact properties, as well as several other HTML components that make up a form (not being submitted, for display/print purposes only), and a ‘print’ button.

The issue I’m running into is that react can’t use window.print, so I’m attempting to incorporate react-to-print via npm. I am just getting started with react-to-print, but while the build completes and uploads, the card breaks when adding this functionality, and I’m expecting a lot of troubleshooting.

My question is, has anyone built a card with print functionality using react-to-print? Just looking for info on if this approach will work, if HS has limitations here, or if anyone has gone a different route and been successful. I sincerely appreciate any help!

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [September 7, 2023, 9:46pm UTC](https://community.hubspot.com/t/custom-crm-card-print-specific-elements/89073/2 "2023-09-07T21:46:04Z")

</div>

Hi, @MIsbrecht 👋 I come offering questions.

- Have you thought about trying to open the content in a new window or iframe and invoking the `window.print()` from there?
- Basic, but, have you checked the browser console for any error messages?
- Have you set up any error handling in your code?

Thanks for the additional information! — Jaycee

---

<div class="post-metadata">

**Author:** ![MIsbrecht](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@MIsbrecht](https://community.hubspot.com/u/MIsbrecht)\
**Post date:** [September 8, 2023, 12:53pm UTC](https://community.hubspot.com/t/custom-crm-card-print-specific-elements/89073/3 "2023-09-08T12:53:14Z")

</div>

Hi Jaycee,

Yes, after discussing in the developer slack and digging in further on the limitations on the custom cards the iframe route looks to be the only direction to go in. I really appreciate your response!

Matt

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [September 8, 2023, 4:33pm UTC](https://community.hubspot.com/t/custom-crm-card-print-specific-elements/89073/4 "2023-09-08T16:33:29Z")

</div>

Thank YOU, @MIsbrecht! — Jaycee
