How to print with styles

By: Luis De Pau | Asked: 07/08/2022
ForumsCategory: How-toHow to print with styles
Luis De PauLuis De Pau asked 2 years ago

A great recommendation by Victor Font is PrintJs and I've successfully used to it in simple views. But in views with tables or backgrounds or that include shorcodes all the styles are ignored. Not even the zebra background of the tables. (Of course it is not a matter of printing the backgrounds).
I use the basic html printing;


 <form method="post" action="#" id="printJS-form">

content to print

<button type="button" onclick="printJS('printJS-form', 'html')">
Print Form



And in the PrintJS page, there are some instructions like:


Print.js will accept an object as argument, where you can configure some options:


But I really couldn't make it work. I'm positive answer must be simple. Any help will be greatly appreciated.


Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community