taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 84b415abe748753422441a899d29fd6da1ea815e
parent 666b767766ef299bd58655c55ece6d4a82c3e947
Author: Sebastian <sebasjm@gmail.com>
Date:   Tue, 23 Apr 2024 10:42:28 -0300

fix PDF printing reported by javier

Diffstat:
Mpackages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx b/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx @@ -97,13 +97,11 @@ export function AttributeEntryScreen(): VNode { function saveAsPDF(): void { const printWindow = window.open("", "", "height=400,width=800"); const divContents = document.getElementById("printThis"); - const styleContents = document.getElementById("style-id"); - if (!printWindow || !divContents || !styleContents) return; + if (!printWindow || !divContents) return; printWindow.document.write( - "<html><head><title>Anastasis Recovery Document</title><style>", + `<html><head><link rel="stylesheet" href="index.css" /><title>Anastasis Recovery Document</title><style>`, ); - printWindow.document.write(styleContents.innerHTML); printWindow.document.write("</style></head><body>&nbsp;</body></html>"); printWindow.document.close(); printWindow.document.body.appendChild(divContents.cloneNode(true));