I want to print it, but because the list scrolls, only the items that fit on the first page show up. The rest of the list is cut off. I’ve tried to rectify this using these @media print styles, but to no avail:
@xlegs did you find a way to print these? I’m having the same problem. I’m trying various @media print {} styles but can’t figure out how to get scrolling content to be included.
I found a solution but it’s a bit hacky. Essentially, this call allows one to print a static page, so I created a function that builds one on a button click.
this.platform.ready().then(() => {
Printer.isAvailable().then(
res => Printer.print(printStyles+printContents,'My App'),
err => alert("Printer not available")
);
});
I wrapped my list in <ion-card id="printable">. Then I manually copy and pasted the global CSS and injected it.
@xlegs Thanks for the reply. Nice work! I eventually came up with a media query that works for my scenario. In my case it came down to the body, ion-nav, and .scroll-content. Link to my findings here, in case it helps anyone: