Skip to content

Commit

Permalink
feat:新增打印方向设置,1 纵向 2 横向,默认为纵向
Browse files Browse the repository at this point in the history
  • Loading branch information
陈程 committed Jan 22, 2024
1 parent 0be65c6 commit 509c725
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/libs/lodop/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ async function print(temp, data, beforePrintMethod) {
temp.title,
temp.width,
temp.height,
temp.intOrient,
temp.pageWidth,
temp.pageHeight
);
Expand Down Expand Up @@ -101,6 +102,7 @@ async function preview(temp, data) {
temp.title,
temp.width,
temp.height,
temp.intOrient,
temp.pageWidth,
temp.pageHeight
);
Expand Down Expand Up @@ -134,6 +136,7 @@ async function previewTemp(temp) {
temp.title,
temp.width,
temp.height,
temp.intOrient,
temp.pageWidth,
temp.pageHeight
);
Expand All @@ -160,6 +163,7 @@ async function _CreateLodop(
pageName,
width,
height,
intOrient = 1,
pageWidth = 0,
pageHeight = 0,
top = 0,
Expand All @@ -171,12 +175,12 @@ async function _CreateLodop(

LODOP.PRINT_INITA(top, left, width, height, pageName);
LODOP.SET_PRINT_PAGESIZE(
1,
intOrient,
pageWidth ? pageWidth + "mm" : 0,
pageHeight ? pageHeight + "mm" : 0,
""
);

LODOP.SET_SHOW_MODE('LANDSCAPE_DEFROTATED', 1); // 横向打印的预览默认旋转90度(正向显示)
return LODOP;
}

Expand Down

0 comments on commit 509c725

Please sign in to comment.