Skip to content

Commit

Permalink
bugfix: avoid blank page in the PDF printing (#5678)
Browse files Browse the repository at this point in the history
* bugfix: avoid blank page in the PDF printing

* auto break is more flexible

* css style format
  • Loading branch information
shun2wang authored Sep 25, 2024
1 parent d474dca commit 78b4564
Showing 1 changed file with 67 additions and 29 deletions.
96 changes: 67 additions & 29 deletions Desktop/html/css/printing.css
Original file line number Diff line number Diff line change
@@ -1,30 +1,68 @@
@media only print
{
#results { display: block; }

.jasp-toolbar h1, .jasp-toolbar h2, .jasp-toolbar h3, .jasp-toolbar h4, .jasp-toolbar h5, .jasp-toolbar h6, .jasp-toolbar div , .jasp-toolbar span
{ display: block !important; }
.toolbar-button { display: none !important; visibility: hidden; }
.jasp-menu { display: none !important; visibility: hidden; }
.jasp-menu-selected { display: none !important; visibility: hidden; }
.jaspReportTop { display: none !important; visibility: hidden; }
body { float: none !important; }

.jasp-toolbar { page-break-after: avoid; }
.jasp-analysis { page-break-after: always; }
.jasp-collection { page-break-inside: avoid; }
.hidden-collection { page-break-inside: auto; }
.object-body { page-break-inside: auto; }
.object-body .hidden-collection { page-break-inside: auto; }
.jasp-image { page-break-inside: avoid; }
.jasp-notes { page-break-inside: avoid; }

.jasp-table-primitive { page-break-inside: avoid; }
.jasp-table table { table-layout:fixed !important; width: 20cm !important; }
.jasp-table table td { white-space: pre-wrap !important; word-wrap: break-all !important; }

.jasp-rsyntax-container { max-width: 20cm !important; }

@media only print {
#results {
display: block;
}
.jasp-toolbar h1, .jasp-toolbar h2, .jasp-toolbar h3, .jasp-toolbar h4, .jasp-toolbar h5, .jasp-toolbar h6, .jasp-toolbar div , .jasp-toolbar span {
display: block !important;
}
.toolbar-button {
display: none !important;
visibility: hidden;
}
.jasp-menu {
display: none !important;
visibility: hidden;
}
.jasp-menu-selected {
display: none !important;
visibility: hidden;
}
.jaspReportTop {
display: none !important;
visibility: hidden;
}
body {
float: none !important;
}
.jasp-toolbar {
page-break-after: avoid;
}
.jasp-analysis {
page-break-after: auto;
}
.jasp-collection {
page-break-inside: avoid;
}
.hidden-collection {
page-break-inside: auto;
}
.object-body {
page-break-inside: auto;
}
.object-body .hidden-collection {
page-break-inside: auto;
}
.jasp-image {
page-break-inside: avoid;
}
.jasp-notes {
page-break-inside: avoid;
}
.jasp-table-primitive {
page-break-inside: avoid;
}
.jasp-table table {
table-layout:fixed !important;
width: 20cm !important;
}
.jasp-table table td {
white-space: pre-wrap !important;
word-wrap: break-all !important;
}
.jasp-rsyntax-container {
max-width: 20cm !important;
}
}
@page {
margin: 1cm;
}

@page { margin: 1cm; }

0 comments on commit 78b4564

Please sign in to comment.