feat(email-to-pdf): add inline images, clickable links, and embedded attachments

- Add CID inline image support via base64 data URI replacement
- Implement clickable link extraction from HTML anchors using regex
- Embed email attachments into PDF using pymupdf embfile_add
- Reduce font sizes for more compact PDF output (18px subject, 12px body)
- Format date with timezone (UTC+HH:MM) while preserving original time
- Clean email address formatting (Name (email) instead of <brackets>)
- Add UI options: page size selector, CC/BCC toggle, attachments toggle
This commit is contained in:
abdullahalam123
2026-01-08 21:36:21 +05:30
parent 4a4a47158f
commit 280348763d
30 changed files with 3978 additions and 9416 deletions

41
package-lock.json generated
View File

@@ -10,7 +10,7 @@
"license": "AGPL-3.0-only",
"dependencies": {
"@bentopdf/gs-wasm": "^0.1.0",
"@bentopdf/pymupdf-wasm": "^0.1.10",
"@bentopdf/pymupdf-wasm": "^0.1.11",
"@fontsource/cedarville-cursive": "^5.2.7",
"@fontsource/dancing-script": "^5.2.8",
"@fontsource/dm-sans": "^5.2.8",
@@ -18,6 +18,7 @@
"@fontsource/kalam": "^5.2.8",
"@fontsource/lato": "^5.2.7",
"@fontsource/merriweather": "^5.2.11",
"@kenjiuno/msgreader": "^1.27.1-alpha.1",
"@matbee/libreoffice-converter": "^2.3.1",
"@neslinesli93/qpdf-wasm": "^0.3.0",
"@pdf-lib/fontkit": "^1.1.1",
@@ -58,6 +59,7 @@
"pdf-lib": "^1.17.1",
"pdfjs-dist": "^5.4.296",
"pdfkit": "^0.17.2",
"postal-mime": "^2.7.1",
"sortablejs": "^1.15.6",
"tailwindcss": "^4.1.14",
"terser": "^5.44.0",
@@ -514,9 +516,9 @@
}
},
"node_modules/@bentopdf/pymupdf-wasm": {
"version": "0.1.10",
"resolved": "https://registry.npmjs.org/@bentopdf/pymupdf-wasm/-/pymupdf-wasm-0.1.10.tgz",
"integrity": "sha512-gej9ItnAswVZhJin8gb0D7rYKqEWvBtO72M4d0eRKP4oARS67eOQERLaKBE4wulIst1x3r3PtHi7673PCmIv+A==",
"version": "0.1.11",
"resolved": "https://registry.npmjs.org/@bentopdf/pymupdf-wasm/-/pymupdf-wasm-0.1.11.tgz",
"integrity": "sha512-sbDFmvm2KzT3oCmqNqMx7w6TMsKpLXeooVK8EVRjyQIV4hU5Ioq0JxWMr8SX7MESu8Caz1feeELd6zt5K966SA==",
"license": "AGPL-3.0",
"peerDependencies": {
"@bentopdf/gs-wasm": "*"
@@ -2055,6 +2057,25 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"node_modules/@kenjiuno/decompressrtf": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/@kenjiuno/decompressrtf/-/decompressrtf-0.1.4.tgz",
"integrity": "sha512-v9c/iFz17jRWyd2cRnrvJg4VOg/4I/VCk+bG8JnoX2gJ9sAesPzo3uTqcmlVXdpasTI8hChpBVw00pghKe3qTQ==",
"license": "BSD-2-Clause"
},
"node_modules/@kenjiuno/msgreader": {
"version": "1.27.1-alpha.1",
"resolved": "https://registry.npmjs.org/@kenjiuno/msgreader/-/msgreader-1.27.1-alpha.1.tgz",
"integrity": "sha512-r/Fc6cW+68YpYfA8K0uRI31AV484QzcFzJWZkVz5HHBUf1TrzznvSZ9rRwCRqdO2uTLoMtMf7FovZ+MNfa379g==",
"license": "Apache-2.0",
"dependencies": {
"@kenjiuno/decompressrtf": "^0.1.3",
"iconv-lite": "^0.6.3"
},
"engines": {
"node": ">= 10"
}
},
"node_modules/@matbee/libreoffice-converter": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@matbee/libreoffice-converter/-/libreoffice-converter-2.3.1.tgz",
@@ -9906,6 +9927,12 @@
"node": ">= 0.4"
}
},
"node_modules/postal-mime": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/postal-mime/-/postal-mime-2.7.1.tgz",
"integrity": "sha512-0VslL0CLSV7PBmglwWR8eCGC5fgsdVictjOG4PEA+vvA0+QJF5SC0tV018CbvAcW4XbpbMIJNd91Dt8vTa9kbA==",
"license": "MIT-0"
},
"node_modules/postcss": {
"version": "8.5.6",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
@@ -9935,9 +9962,9 @@
}
},
"node_modules/preact": {
"version": "10.28.1",
"resolved": "https://registry.npmjs.org/preact/-/preact-10.28.1.tgz",
"integrity": "sha512-u1/ixq/lVQI0CakKNvLDEcW5zfCjUQfZdK9qqWuIJtsezuyG6pk9TWj75GMuI/EzRSZB/VAE43sNWWZfiy8psw==",
"version": "10.28.2",
"resolved": "https://registry.npmjs.org/preact/-/preact-10.28.2.tgz",
"integrity": "sha512-lbteaWGzGHdlIuiJ0l2Jq454m6kcpI1zNje6d8MlGAFlYvP2GO4ibnat7P74Esfz4sPTdM6UxtTwh/d3pwM9JA==",
"license": "MIT",
"peer": true,
"funding": {