问题
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