EasyUI Forum

General Category => General Discussion => Topic started by: jega on July 16, 2019, 03:21:57 PM



Title: Print using printJS plugin
Post by: jega on July 16, 2019, 03:21:57 PM
Trying to find a way to print an easyui dialog, or any part inside an div/form.

Found printJS plugin, but it doesn't print the easyui css

Any hit to get it to work

https://printjs.crabbly.com/

Jesper


Title: Re: Print using printJS plugin
Post by: stworthy on July 19, 2019, 06:47:07 PM
Please pass the 'css' parameter to the printJS function.
Code:
printJS({
printable: 'dlg',
type: 'html',
css: '../../themes/default/easyui.css'
})


Title: Re: Print using printJS plugin
Post by: jega on July 22, 2019, 12:06:43 AM
Hi stworthy

Thanks for help. Now it's better, BUT missing checkbox marks, tagbox tags and linkbutton group color.

Solution for most of it was now to choose Additional settings" "Option" on print dialog, and use background graphic.

Only one thing dosen't work. Have a button group with this css

<style type="text/css">
   .l-btn-selected{
      background: #4cae4c;
      color: #fff;
   }
}
</style>

It makes active button green. On print it still is grey. Have tried different things with targetStyles, but with no luck