crabbly / crabbly/Print.js

Printing bootstrap grids

Open
#560 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.5k
Forks
688
PR merge metrics
No merged PRs in 30d

Description

Firstly...the plugin is awesome.

However, I'm struggling to get a css bootstrap grid printing. If I use class="col" the elements print as columns, but if I specify any more specific details, such as class="col-sm-12 col-md-8" they always show full width. There is a jsfiddle which shows it working, but if I use that CSS code, it loses other elements on the page like the chartjs charts I'm using.

https://jsfiddle.net/crabbly/rj397t4v/

I've tried passing in the bootstrap grid and min.css files into the array, but this did not change anything.

Any ideas?

`function printMe(ID,format,ignoreID,title){
printJS({
printable: ID,
type: format,
css: ['../assets/css/style.css','../assets/css/custom.css','https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/css/bootstrap-grid.min.css','https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/css/bootstrap.min.css'],
ignoreElements:[ignoreID],
documentTitle: 'Test Data Report',
header: title,
targetStyles: ['*'],
});
}`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.