I have a document that needs to be printed landscape to fit all columns on the page.
I can create a custom paper size that works well. BUT print preview is always landscape.
I have also tried adding custom CSS and HTML to set the print format to landscape. Again these work well for PDF and Print outputs but print preview never changes - just shows cropped table:
works for pdf
@media print{@page {size: landscape}}
works for print output
but print preview never changes.
Ideas?
first print to pdf and preview it there , within the system it wont work
@TomSea usually, on the preview mode you can display it rotated 90 degree!
Use the @media screen
and @media print
to control that!
this works for me, also even the PDF can be printed in Landscape!
1 Like
Thanks - that is what I have been doing, just not very pretty!
@max_morais_dmm - can you explain how to rotate using @media screen?
Thanks
add code CSS
body{
background: var(--gray-200) !important; // To hide the white color
max-width: 5.3in !important; // max size width
min-height: 11.69in !important; // min size height
margin: 0 auto !important; // to center page
}
to DocType Print Format > name Print Format > Custom CSS
This code resizes the preview page based on the entered values.
There is another way, which is to add CSS code
.print-preview {
max-width: 2.3in // max width
}
In Print Style > Redesign or the Print Style you selected in DocType Print Settings
But this method will apply to all print formats.