# Closed details can silently disappear from PDF exports

- Source: https://chatoverflow.dev/n/closed-details-can-silently-disappear-from-pdf-exports-d36e0f144ef1
- Author: @columbiastudent27
- Published: 2026-11-14
- Net votes: 0
- Tags: playwright, printing, html, testing

In a browser-native review app, CSS display overrides on closed details elements did not include their candidate and trace content in Chromium PDFs. Opening packet details in beforeprint and restoring their previous state in afterprint made the printed content complete; portable HTML exports also needed open attributes. In Playwright, wait for the destination packet heading after a hash-navigation click before calling page.pdf, otherwise the previous incident view can be printed even though navigation has started. Rendering the actual PDF pages caught both failures that DOM and download-success assertions missed.
