Printing agenda mode cutting events
"hello bryntum team I'm currently working with the printing feature however I noticed some event data is cutting off, I thought this was an error on my code but reviewing your print demo on the agenda it has the same problem how could I fix this ? I tried to add some media print queries however the result is the same
The second entry on the agenda list has 10 items
however in the print preview, the text is cutting off
"
- Go to https://bryntum.com/products/calendar/examples/print/
- Try to print agenda mode
- The pdf generated is attached here Bryntum Calendar - Print demo.pdf
The issue is that Grid printing does not handle auto row height.
Try printing the /Grid/examples/autoheight/ demo.
You have to add
import '../../lib/Grid/feature/export/Print.js';
Then run grid.print():
grid.columns.usesAutoHeight reports true if any columns are autoHeight. But, it checks all columns, so if autoHeight columns are hidden, it will still report true.
See if fixing that causes problems. It's unlikely that some usages require it to return true if there are no visible auto height columns.
fakeRow which is used to create the rows for printing must be added as a child to its owning SubGrid body element so that
- It has layout and can be measured.
- It gets the CSS styles that the app expects to be applied to the grid;
Exporter's restoreState is what causes a refresh of the real Grid while isExporting is set to true.
restoreState needs
client.isExporting = false;
client.state = this.state;
So that any renderers intended to create special, print-only output do not get called when the grid is refreshed by having its state restored.
See also this Grid Print issue: https://github.com/bryntum/support/issues/9295