Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfeng33 committed Nov 26, 2024
1 parent 9ca0c74 commit f41f771
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down
1 change: 1 addition & 0 deletions apps/www/src/registry/registry-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ import { withDraggables } from './withDraggables';`,
'table-dropdown-menu',
'toggle-toolbar-button',
'turn-into-dropdown-menu',
'export-toolbar-button',
],
type: 'registry:ui',
},
Expand Down

0 comments on commit f41f771

Please sign in to comment.