Skip to content

Commit

Permalink
feat: set margin style when printing #431
Browse files Browse the repository at this point in the history
  • Loading branch information
Hufe921 committed Jan 31, 2024
1 parent 2a6a41c commit 4015707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/editor/utils/print.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function printImageBase64(
container.append(image)
})
const style = document.createElement('style')
const stylesheet = `*{margin:0;padding:0;}`
const stylesheet = `*{margin:0;padding:0;}@page{margin:0;}`
style.append(document.createTextNode(stylesheet))
setTimeout(() => {
doc.write(`${style.outerHTML}${container.innerHTML}`)
Expand Down

0 comments on commit 4015707

Please sign in to comment.