简体   繁体   English

将签名图像添加到iOS中的pdf,尤其是iPhone / iPad

[英]Add a signature image to a pdf in iOS for the iPhone/iPad in particular

With the iOS support for Quartz 2D and its support for the PDF format; iOS支持Quartz 2D及其对PDF格式的支持; should adding a signature image to a pdf be a little easier. 应该将标志性图像添加到pdf更容易一些。 I have looked all over and saw people are using the PDFKit, UIView or Core Graphic Library. 我看了一遍,看到人们正在使用PDFKit,UIView或核心图形库。 Which is the easiest and the recommended library for the effort? 哪个是最简单的推荐库? Also, are there simple examples of the recommend library. 此外,是否有推荐库的简单示例。 When I tried to see how Quartz 2D worked, all I could find are narrative explanations about how it worked and specific method you may use but no complete examples. 当我试图了解Quartz 2D是如何工作的时候,我所能找到的只是关于它如何工作的叙述性解释以及你可能使用的具体方法,但没有完整的例子。 You know the hello world one. 你知道你好世界的一个。 Anyway, I am new to iOS development but been writing code for over 20 years so I might be able to pick this OS up as well. 无论如何,我是iOS开发的新手,但是编写代码超过20年,所以我也可以选择这个操作系统。

Can some poor soul have pity on me and please point me in the right direction? 一些可怜的灵魂可以怜悯我,请指出我正确的方向吗?

I have done this by loading the old pdf file on view and then add signature on that view and then render the view. 我通过在视图上加载旧的pdf文件然后在该视图上添加签名然后渲染视图来完成此操作。 check the following post 查看以下帖子

Add a signature image to a pdf without showing the pdf data to user in iOS 将签名图像添加到pdf,而不向iOS中的用户显示pdf数据

But not able create the pdf which contain existing pdf with signature "without showing on view" . 但是无法创建包含现有pdf的pdf,其签名为“不在视图上显示”。

It's too late to answer this question now. 现在回答这个问题为时已晚。 But let me just provide some pointers for people who may bump into this question in future. 但是,请允许我为将来可能碰到这个问题的人提供一些建议。
This one summarizes PDF handling in iOS pretty well. 这个很好地总结了iOS中的PDF处理。 Good for starters. 适合初学者。 http://www.ioslearner.com/generate-pdf-programmatically-iphoneipad/#more-242 http://www.ioslearner.com/generate-pdf-programmatically-iphoneipad/#more-242
This one is also similar, but not very exhaustive. 这个也很相似,但不是很详尽。 http://www.absoluteripple.com/1/post/2012/03/generating-pdf-in-ios.html http://www.absoluteripple.com/1/post/2012/03/generating-pdf-in-ios.html
The above links do not talk about handling existing PDFs. 以上链接不涉及处理现有PDF。 I found this stackoverflow answer really useful for that. 我发现这个stackoverflow的答案对此非常有用。 Add pdf page to an existing pdf objective-c Just a note, if you want manipulate existing PDFs, Quartz 2d is the way to go. 将pdf页面添加到现有的pdf目标-c只需注意,如果您想要操作现有的PDF,Quartz 2d就是您的选择。
Also look at reference pages of CGPDFDocument, CGPDFPage, CGPDFContext and CGContext. 另请参阅CGPDFDocument,CGPDFPage,CGPDFContext和CGContext的参考页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM