From 3cc81c67fe6fd945ba0954f63c3ff67f31e5a0fc Mon Sep 17 00:00:00 2001 From: Sean Dolbec Date: Sat, 22 Aug 2026 19:55:36 -0400 Subject: [PATCH] fix: wrap long CPE strings in PDF tables instead of page-edge truncation (#167) Adds a print-media CSS block: constrains content width, shrinks table typography, and enables word-break on monospace cells so long CPE identifiers wrap within their columns. Verified visually - cpe:/a:openbsd:openssh:10.3 now fully visible on one page with no edge cut-off. --- nmap-pdf-olive-legacy.xsl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nmap-pdf-olive-legacy.xsl b/nmap-pdf-olive-legacy.xsl index 549c9d0..558f03d 100644 --- a/nmap-pdf-olive-legacy.xsl +++ b/nmap-pdf-olive-legacy.xsl @@ -142,6 +142,17 @@ Updated: 2026 width: 100%; } + /* #167 v2: keep wide tables inside the page */ + @media print { + html, body { width: 100% !important; } + .max-w-7xl { max-width: 100% !important; padding: 0 !important; } + table { table-layout: auto; } + th, td { font-size: 9px !important; padding: 3px 4px !important; } + td, th { word-break: break-word; overflow-wrap: anywhere; } + .font-mono, td.font-mono { word-break: break-all !important; } + nav.fixed { position: static !important; } + } + .card { background: white; border: 1px solid #d8dbc7;