From 95a14c59fcef40e29e90e619c51a515b9bb4b2f2 Mon Sep 17 00:00:00 2001 From: Riccardo Giorato Date: Sat, 27 Dec 2025 12:16:10 +0100 Subject: [PATCH] Add clickable link to PDF footer and remove owner check for download but --- app/api/download-pdf/route.ts | 10 ++++++++-- components/editor/editor-toolbar.tsx | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/api/download-pdf/route.ts b/app/api/download-pdf/route.ts index acd215b..5f90d80 100644 --- a/app/api/download-pdf/route.ts +++ b/app/api/download-pdf/route.ts @@ -51,8 +51,14 @@ export async function GET(request: NextRequest) { pdf.addImage(imgData, 'JPEG', 10, 10, 190, 277); // A4 portrait size minus margins // Add "Created by Make Comics" at the bottom - pdf.setFontSize(8); - pdf.text('Created by Make Comics', 105, 290, { align: 'center' }); + pdf.setFont('helvetica', 'bold'); + pdf.setFontSize(12); + const text = 'Created by Make Comics'; + const textX = 105; + const textY = 290; + pdf.text(text, textX, textY, { align: 'center' }); + const dimensions = pdf.getTextDimensions(text); + pdf.link(textX - dimensions.w / 2, textY - dimensions.h / 2, dimensions.w, dimensions.h, { url: 'https://make-comics.vercel.app/' }); } const pdfBuffer = Buffer.from(pdf.output('arraybuffer')); diff --git a/components/editor/editor-toolbar.tsx b/components/editor/editor-toolbar.tsx index d72f6e7..93942f2 100644 --- a/components/editor/editor-toolbar.tsx +++ b/components/editor/editor-toolbar.tsx @@ -68,7 +68,7 @@ export function EditorToolbar({ Share - {isOwner && onDownloadPDF && ( + {onDownloadPDF && (