diff options
| author | Syndamia <kamen@syndamia.com> | 2025-02-08 17:50:40 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2025-02-08 17:50:40 +0200 |
| commit | 0769feb5cda8c21ea12a30f94f03b5a74f61e804 (patch) | |
| tree | 846be569f0fa93c2e19051600d067a7ed7ad7933 /controllers | |
| parent | 2c1952705148b57b39638436f18a739518308ec6 (diff) | |
| download | nowayforward_human-0769feb5cda8c21ea12a30f94f03b5a74f61e804.tar nowayforward_human-0769feb5cda8c21ea12a30f94f03b5a74f61e804.tar.gz nowayforward_human-0769feb5cda8c21ea12a30f94f03b5a74f61e804.zip | |
fix(controllers/archive): Remove margins from pdf exports
Diffstat (limited to 'controllers')
| -rw-r--r-- | controllers/archive.php | 6 |
1 files changed, 6 insertions, 0 deletions
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"); |
