diff options
author | Sebastian <sebasjm@gmail.com> | 2024-04-23 10:42:28 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-04-23 10:42:28 -0300 |
commit | 84b415abe748753422441a899d29fd6da1ea815e (patch) | |
tree | 4345bfb84fcd58d3cda39615ad001a155b1c2bbf | |
parent | 666b767766ef299bd58655c55ece6d4a82c3e947 (diff) | |
download | wallet-core-84b415abe748753422441a899d29fd6da1ea815e.tar.xz |
fix PDF printing reported by javier
-rw-r--r-- | packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx | 6 |
1 files 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 index e38b91b12..1f8cea7aa 100644 --- 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> </body></html>"); printWindow.document.close(); printWindow.document.body.appendChild(divContents.cloneNode(true)); |