Skip to content

Commit ed795bd

Browse files
committed
🐛 修复导出pdf的bug
1 parent fcc03aa commit ed795bd

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Mac/View/MPreviewView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class MPreviewView: WKWebView, WKUIDelegate, WKNavigationDelegate {
103103
let dispatchGroup = DispatchGroup()
104104
var pdfDatas: [Data] = []
105105

106-
for pageIndex in 0..<pageCount {
106+
for pageIndex in 0 ..< pageCount {
107107
dispatchGroup.enter()
108108

109109
let pdfConfiguration = WKPDFConfiguration()
@@ -150,7 +150,7 @@ class MPreviewView: WKWebView, WKUIDelegate, WKNavigationDelegate {
150150

151151
for pdfData in pdfDatas {
152152
if let dataDocument = PDFDocument(data: pdfData) {
153-
for pageIndex in 0..<dataDocument.pageCount {
153+
for pageIndex in 0 ..< dataDocument.pageCount {
154154
if let page = dataDocument.page(at: pageIndex) {
155155
pdfDocument.insert(page, at: pdfDocument.pageCount)
156156
}

Mac/ViewController.swift

-1
Original file line numberDiff line numberDiff line change
@@ -2132,7 +2132,6 @@ class ViewController:
21322132
}
21332133
}
21342134

2135-
21362135
func disableMiaoYanPPT() {
21372136
disablePresentation()
21382137
UserDefaultsManagement.magicPPT = false

0 commit comments

Comments
 (0)