Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Print js button

Security covered Under active development 194 sites

This module allows you to easily print specific sections of your Drupal pages. You can designate a div with a custom ID to contain the content you want to print, and the module will generate a print-ready version of that content along with your site's CSS. It also offers extensibility for customizing the output format.

Sometimes you just want to Print only content in Div with your custom id
This module uses https://printjs.crabbly.com/ library for this purpose.
you can specify the id you want to print in configuration, by default id="print"
<div id="print"> Print me</div>

How to use:

  • It's easy to print specific parts of a page by wrapping content in a div with a custom ID, e.g. <div id="print">...</div>. The ID can be configured in the module settings.
  • Place Printjs block, it will show print button Print, when you click will send content in id=print + css of page to printer.
  • You can add print buttons to trigger printing in views headers/footers.
  • The module is highly extensible via hooks like hook_preprocess_printjs. For example, you can customize the print output to generate PDFs, images,json etc. instead of plain HTML more infomation in https://printjs.crabbly.com/.

In summary, PrintJs is a developer-friendly module that offers easy and configurable printing of Drupal content. By using div IDs, you can selectively print just what you need, not print all page with header / footer/ sidebar

Do you like this module? Show your appreciation by buying me ☕.

Drupal 8–11

Ask your assistant about Print js button

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
Jul 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
1.0.10 Stable 8–11 Jan 7, 2025
1.0.9 Stable 8–11 Jun 24, 2024
1.0.8 Stable 8–11 May 20, 2024
1.0.7 Stable 8–11 Apr 3, 2024
1.0.6 Stable 8–10 Oct 28, 2023
1.0.5 Stable 8–10 Sep 20, 2023
1.0.4 Stable 8–10 Jul 26, 2023