Skip to content

Commit f41f771

Browse files
committed
fix
1 parent 9ca0c74 commit f41f771

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

apps/www/src/registry/default/plate-ui/export-toolbar-button.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ export function ExportToolbarButton({ children, ...props }: DropdownMenuProps) {
5353
const pdfDoc = await PDFLib.PDFDocument.create();
5454
const page = pdfDoc.addPage([canvas.width, canvas.height]);
5555
const imageEmbed = await pdfDoc.embedPng(canvas.toDataURL('PNG'));
56-
56+
const { height, width } = imageEmbed.scale(1);
5757
page.drawImage(imageEmbed, {
58-
height: canvas.height,
59-
width: canvas.width,
58+
height,
59+
width,
6060
x: 0,
6161
y: 0,
6262
});

apps/www/src/registry/registry-ui.ts

+1
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ import { withDraggables } from './withDraggables';`,
364364
'table-dropdown-menu',
365365
'toggle-toolbar-button',
366366
'turn-into-dropdown-menu',
367+
'export-toolbar-button',
367368
],
368369
type: 'registry:ui',
369370
},

0 commit comments

Comments
 (0)