Swift PDFViewer设置数字证书显示

发布于 2025-01-24 04:49:25 字数 833 浏览 3 评论 0原文

在我们的PDFView对象中,当我显示具有应用于文档的数字证书的pdf时,数字证书显示为像这样的交叉盒子(红色盒子是在我的Mac上使用预览后完成的):

我们的应用仅显示PDF不会对其进行修改。

这是我使用的代码,您会看到我仅在文档上设置缩放,而没有其他值。

var mPdfView: PDFView!
//urlStr comes from our server and is a valid url to get a pdf from our db.

if let url = URL(string: urlStr){
    if let pdfDocument = PDFDocument(url: url) {
        mPdfView.document = pdfDocument

        if(pdfScaleFactor > 0.0){
            mPdfView.scaleFactor = pdfScaleFactor
        }

    }
}

是否有设置或方法可以定义PDFVIEW对象中如何显示数字证书?

我试图查看 pdfview pdfdocument pdfview >和 pdfantotation 课程,尚未找到禁用显示设置或定义我们希望如何显示数字证书的良好途径。

感谢您提前的帮助!

In our PDFView object when I display a PDF that has a Digital certificate applied to the document the digital cert is displayed as a crossed out box like so (the red box was done after using Preview on my Mac):

digital certificate display

Our app only displays the PDF not modifies it.

Here is the code I am using, you'll see I am only setting the zoom on the document, no other values.

var mPdfView: PDFView!
//urlStr comes from our server and is a valid url to get a pdf from our db.

if let url = URL(string: urlStr){
    if let pdfDocument = PDFDocument(url: url) {
        mPdfView.document = pdfDocument

        if(pdfScaleFactor > 0.0){
            mPdfView.scaleFactor = pdfScaleFactor
        }

    }
}

Is there a setting or way to define how digital certs are displayed in the PDFView object?

I have tried looking into the doc for the PDFView, PDFDocument, and PDFAnnotation classes and have not found a good path to either disable a display setting or define how we want the digital certs to be displayed.

Thank you for your help in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文