diff --git a/apps/www/src/registry/default/plate-ui/export-toolbar-button.tsx b/apps/www/src/registry/default/plate-ui/export-toolbar-button.tsx index 04cd9f5283..a659a8bf70 100644 --- a/apps/www/src/registry/default/plate-ui/export-toolbar-button.tsx +++ b/apps/www/src/registry/default/plate-ui/export-toolbar-button.tsx @@ -53,10 +53,10 @@ export function ExportToolbarButton({ children, ...props }: DropdownMenuProps) { const pdfDoc = await PDFLib.PDFDocument.create(); const page = pdfDoc.addPage([canvas.width, canvas.height]); const imageEmbed = await pdfDoc.embedPng(canvas.toDataURL('PNG')); - + const { height, width } = imageEmbed.scale(1); page.drawImage(imageEmbed, { - height: canvas.height, - width: canvas.width, + height, + width, x: 0, y: 0, }); diff --git a/apps/www/src/registry/registry-ui.ts b/apps/www/src/registry/registry-ui.ts index 5b7bcf1537..5f31f9e4bc 100644 --- a/apps/www/src/registry/registry-ui.ts +++ b/apps/www/src/registry/registry-ui.ts @@ -364,6 +364,7 @@ import { withDraggables } from './withDraggables';`, 'table-dropdown-menu', 'toggle-toolbar-button', 'turn-into-dropdown-menu', + 'export-toolbar-button', ], type: 'registry:ui', },