aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-04-23 10:42:28 -0300
committerSebastian <sebasjm@gmail.com>2024-04-23 10:42:28 -0300
commit84b415abe748753422441a899d29fd6da1ea815e (patch)
tree4345bfb84fcd58d3cda39615ad001a155b1c2bbf
parent666b767766ef299bd58655c55ece6d4a82c3e947 (diff)
downloadwallet-core-84b415abe748753422441a899d29fd6da1ea815e.tar.xz
fix PDF printing reported by javier
-rw-r--r--packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx6
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>&nbsp;</body></html>");
printWindow.document.close();
printWindow.document.body.appendChild(divContents.cloneNode(true));