【发布时间】:2018-03-06 20:34:00
【问题描述】:
我有一个 PDF 页面,例如 PDF 页面 0。我在页面中更改并添加了一些内容。现在我想保存在 PDFDocument 中。
这是我的代码 这是我的 pdf 文档:
var pdfDocument: PDFDocument?
pdfView.annotationsChanged(on: (pdfView.currentPage)!)
完成这项工作后,pdf 在加载中发生了变化,但重新加载后我得到了 pdf 而没有编辑。
我知道我可以像 pdfDocument?.write(to:) 一样保存,但如果可能的话,我想替换一页而不是全部 pdfDoucment。如果没有,我想用新的变化保存所有页面,比如新的 pdf。
也许我会用这个但是怎么用
pdfDocument?.write(toFile: String, withOptions: [PDFDocumentWriteOption : Any]?)
【问题讨论】:
-
@AamirR 您没有其他解决方案,或者您尝试其他解决方案