iOS PDFkit cannot add custom attribute to pdf document

寵の児 提交于 2021-02-07 20:25:34

问题


I am trying to add custom attribute to a pdf document metadata, but after savedocument(document) the custom attribute is not added to the document.

    @IBOutlet weak var pdfContainerView: PDFView!
    private func setDocumentAttributes(){
        if let document = pdfContainerView.document{
            var attributes = document.documentAttributes
            attributes!["NewAttribute"] = "Test"
            document.documentAttributes = attributes
            savedocument(document)
        }
    }

来源:https://stackoverflow.com/questions/54986089/ios-pdfkit-cannot-add-custom-attribute-to-pdf-document

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!