fix: 在线编辑下载文本方向全部设为纵向
This commit is contained in:
+13
-1
@@ -370,7 +370,19 @@ public class OnlyOfficeController {
|
|||||||
|
|
||||||
// 加载文档
|
// 加载文档
|
||||||
Document doc = new Document(filePath + path);
|
Document doc = new Document(filePath + path);
|
||||||
doc.getSections().get(0).getPageSetup().setPageNumberStyle(PageNumberStyle.Roman_Upper);
|
int i = 0;
|
||||||
|
try {
|
||||||
|
doc.getSections().get(0).getPageSetup().setPageNumberStyle(PageNumberStyle.Roman_Upper);
|
||||||
|
for (; i < Integer.MAX_VALUE; i++) {
|
||||||
|
if (i == 1) {
|
||||||
|
doc.getSections().get(1).getPageSetup().setOrientation(PageOrientation.Portrait);//纵向
|
||||||
|
}
|
||||||
|
doc.getSections().get(i).getPageSetup().setOrientation(PageOrientation.Portrait);//纵向
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.info("设置纵向页面,循环次数为:{}", i + 1);
|
||||||
|
}
|
||||||
|
|
||||||
doc.getSections().get(1).getPageSetup().setPageNumberStyle(PageNumberStyle.Roman_Upper);
|
doc.getSections().get(1).getPageSetup().setPageNumberStyle(PageNumberStyle.Roman_Upper);
|
||||||
|
|
||||||
String downloadDocxFileTempUrl = filePath + "/downloadDocxFileTemp";
|
String downloadDocxFileTempUrl = filePath + "/downloadDocxFileTemp";
|
||||||
|
|||||||
Reference in New Issue
Block a user