feat: set print layout format when printing #448

This commit is contained in:
Hufe921
2024-03-08 20:33:17 +08:00
parent 180bd08839
commit c6534f766d
2 changed files with 24 additions and 5 deletions
+6 -2
View File
@@ -1920,7 +1920,7 @@ export class CommandAdapt {
}
public async print() {
const { scale, printPixelRatio } = this.options
const { scale, printPixelRatio, paperDirection } = this.options
if (scale !== 1) {
this.draw.setPageScale(1)
}
@@ -1930,7 +1930,11 @@ export class CommandAdapt {
pixelRatio: printPixelRatio,
mode: EditorMode.PRINT
})
printImageBase64(base64List, width, height)
printImageBase64(base64List, {
width,
height,
direction: paperDirection
})
if (scale !== 1) {
this.draw.setPageScale(scale)
}