diff --git a/apps/console/src/components/documents/PDFPreview.tsx b/apps/console/src/components/documents/PDFPreview.tsx index 07dc6199..0d2d3837 100644 --- a/apps/console/src/components/documents/PDFPreview.tsx +++ b/apps/console/src/components/documents/PDFPreview.tsx @@ -71,6 +71,13 @@ export function PDFPreview({ src, name }: { src: string; name?: string }) { } }; + const handleDownload = () => { + const link = document.createElement("a"); + link.href = src; + link.download = name || "document.pdf"; + link.click(); + }; + return (
{/* Custom Zoom Controls */} @@ -97,7 +104,7 @@ export function PDFPreview({ src, name }: { src: string; name?: string }) { - diff --git a/apps/trust/src/components/PDFPreview.tsx b/apps/trust/src/components/PDFPreview.tsx index 8e378115..572bb299 100644 --- a/apps/trust/src/components/PDFPreview.tsx +++ b/apps/trust/src/components/PDFPreview.tsx @@ -71,6 +71,13 @@ export function PDFPreview({ src, name }: { src: string; name?: string }) { } }; + const handleDownload = () => { + const link = document.createElement("a"); + link.href = src; + link.download = name || "document.pdf"; + link.click(); + }; + return (
{/* Custom Zoom Controls */} @@ -97,7 +104,7 @@ export function PDFPreview({ src, name }: { src: string; name?: string }) { -