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

Bootstrap 4 grid problems

benfiratkaya opened this issue · comments

Not working bootstrap grid system in printing view screen.

Must be:
Screenshot_360

Printer view:
Screenshot_361

I wrote custom code for @media print but I'm looking for another solution.

See other bootstrap related issues:
#208

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?