Webpage printing prints only the first page #5189

Closed
opened 2025-12-29 19:25:17 +01:00 by adam · 2 comments
Owner

Originally created by @erdnaxe on GitHub (Aug 17, 2021).

Originally assigned to: @thatmattlove on GitHub.

NetBox version

v3.0-beta2

Python version

3.9

Steps to Reproduce

  1. Go on http://netbox.example.com/dcim/cables/
  2. Launch the printing wizard (CTRL-P)
  3. The printing wizard says that the maximum number of page it can print is 1, and data is missing.

image
(example on a test instance using Firefox 91)

Expected Behavior

Be able to print the whole list of cables.

Observed Behavior

One the first page is printed.

Also, the user profile dropdown is visible in the middle of the page.

Originally created by @erdnaxe on GitHub (Aug 17, 2021). Originally assigned to: @thatmattlove on GitHub. ### NetBox version v3.0-beta2 ### Python version 3.9 ### Steps to Reproduce 1. Go on `http://netbox.example.com/dcim/cables/` 2. Launch the printing wizard (`CTRL-P`) 3. The printing wizard says that the maximum number of page it can print is 1, and data is missing. ![image](https://user-images.githubusercontent.com/2663216/129727020-55ea2257-c863-4a26-bf82-478b144d47ff.png) (example on a test instance using Firefox 91) ### Expected Behavior Be able to print the whole list of cables. ### Observed Behavior One the first page is printed. Also, the user profile dropdown is visible in the middle of the page.
adam added the type: bugstatus: under reviewbeta labels 2025-12-29 19:25:17 +01:00
adam closed this issue 2025-12-29 19:25:17 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 17, 2021):

My guess is it's getting hung up on the full-height sidebar, or the footer. @thatmattlove any ideas?

In v2.x we have a noprint utility CSS class that we use to hide certain elements from the printable view, but it doesn't seem to have made it into v3.0. Maybe that's the approach we should take?

/* Printer friendly CSS class and various fixes for printing. */
@media print {
    .noprint {
        display: none !important;
    }
}
@jeremystretch commented on GitHub (Aug 17, 2021): My guess is it's getting hung up on the full-height sidebar, or the footer. @thatmattlove any ideas? In v2.x we have a `noprint` utility CSS class that we use to hide certain elements from the printable view, but it doesn't seem to have made it into v3.0. Maybe that's the approach we should take? ```css /* Printer friendly CSS class and various fixes for printing. */ @media print { .noprint { display: none !important; } } ```
Author
Owner

@thatmattlove commented on GitHub (Aug 19, 2021):

09d745d should contain several fixes for printing including that one @jeremystretch, as well as fixing this issue. FWIW, it was actually due to:

main.layout {
  display: flex;
  height: 100vh;
  overflow-x: auto;
  overflow-y: hidden;
}

(the overflow and display properties, mainly)

There's now a media override in place:

main.layout {
  @media print {
    position: static !important;
    display: block !important;
    height: 100%;
    overflow-x: visible !important;
    overflow-y: visible !important;
  }
}
@thatmattlove commented on GitHub (Aug 19, 2021): 09d745d should contain several fixes for printing including that one @jeremystretch, as well as fixing this issue. FWIW, it was actually due to: ```scss main.layout { display: flex; height: 100vh; overflow-x: auto; overflow-y: hidden; } ``` (the `overflow` and `display` properties, mainly) There's now a media override in place: ```scss main.layout { @media print { position: static !important; display: block !important; height: 100%; overflow-x: visible !important; overflow-y: visible !important; } } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5189