草庐IT

CGPDFDictionaryGetString

全部标签

ios - CGPDFDictionaryGetString 函数 nil 参数异常

我发现无法获取pdf中的内容类型。我在thisexample上构建了我的代码我试图从字典中读取内容类型的地方。我发现类型的键是Type。但是我收到一个错误:fatalerror:unexpectedlyfoundnilwhileunwrappinganOptionalvalue这是我的代码:pdfDoc=CGPDFDocumentCreateWithURL(url)if(pdfDoc!=nil){letpdfCatalog=CGPDFDocumentGetCatalog(pdfDoc)varuriStringRef:UnsafeMutablePointer!if(CGPDFDictio