【发布时间】:2018-05-02 07:28:53
【问题描述】:
我正在使用以下简单代码来加载 pdf 表单,但我不希望它以可编辑的形式加载。我没有找到任何限制它以仅查看模式加载的内容。
NSData *fileData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"PdfFormExample" ofType:@"pdf"]];
PDFDocument *pdfDocument = [[PDFDocument alloc] initWithData:fileData];
PDFView *pdfView = [[PDFView alloc] initWithFrame:self.view.frame];
pdfView.document = pdfDocument
[self.view addSubView:pdfView];
谢谢
【问题讨论】:
-
userInteractionEnabled 可能是一个解决方案
-
@MuhammadZohaibEhsan 这将禁用许多功能,如缩放、单击链接等。我试过了,但我最终遇到了这些问题。
-
说得好。请注意您的荣誉:)
标签: ios objective-c swift ios11 pdfkit