From 0769feb5cda8c21ea12a30f94f03b5a74f61e804 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 8 Feb 2025 17:50:40 +0200 Subject: fix(controllers/archive): Remove margins from pdf exports --- controllers/archive.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'controllers') diff --git a/controllers/archive.php b/controllers/archive.php index 4e4ac77..80c8b1f 100644 --- a/controllers/archive.php +++ b/controllers/archive.php @@ -500,8 +500,14 @@ class DownloadPage { $styleTag = $dom->createElement('link', ''); $styleTag->setAttribute('rel', 'stylesheet'); $styleTag->setAttribute('href', '/archive/topbar.css'); + + $printStyleTag = $dom->createElement('style', ' + @page { margin: 0 !important; padding: 0 !important; } + '); + $head = $dom->getElementsByTagName('head')->item(0); $head->appendChild($styleTag); + $head->appendChild($printStyleTag); $this->page_contents = $dom->saveHTML(); $indexFile = fopen($folder_path . '/index.php', "a"); -- cgit v1.2.3