jasonday / printThis

jQuery printing plugin; print specific elements on a page

Home Page:https://jasonday.github.io/printThis/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Meet an issue when print bootstrap table

BruceGoodGuy opened this issue · comments

I'm trying to print a bootstrap table. Everything looks good but from page 2 i have a problem - it looks like conflict elements (please refer screenshot to know more)

Screenshots
x

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser chrome
  • Version 84.0.4147.89 (Official Build) (64-bit)

Sorry I missed this:

My guess is that you're printing a specific child of Bootstrap's grid parent (<div class="container">), hence why the grid doesn't work correctly when only the child is copied into the iframe.

You have a few options:

  • print the parent grid container and use @media print CSS to hide other elements you don't need
  • Craft new CSS to adjust the layout and import that CSS with loadCSS
  • use beforePrintEvent to write javascript to wrap the content copied into the iframe in the grid container (may not work consistently)

You likely need some print specific CSS to set the same constraints or inherited ancestor classes that are present in the modal or page.

Hi, any update to this issue?