如何在 iOS 应用程序中以编程方式创建 PDF 文件? [英] How can I create a PDF file programmatically in an iOS application?

查看:24
本文介绍了如何在 iOS 应用程序中以编程方式创建 PDF 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何根据用户操作生成 PDF 文件?

解决方案

参见 "Drawing with Quartz" 了解如何创建 PDF 图形上下文.

一些注意事项:

<块引用>

iPhoneOS注意:如果您想在 iPhone 应用程序中创建 PDF 图形上下文,请确保您还阅读了在 iPhone OS 中绘制到图形上下文"(第 27 页)."

<块引用>

您可以将任何内容写入适合您的应用程序的 PDF(图像、文本、路径绘制),还可以添加链接和加密.有关更多信息,请参阅PDF 文档创建、查看和转换"(第 177 页))."

How to generate a PDF file on a user action?

解决方案

See "Drawing with Quartz" to see how to create a PDF Graphics Context.

Some notes:

"iPhoneOSNote: If you want to create a PDF graphics context in an iPhone application, make sure you also read "Drawing to a Graphics Context in iPhone OS" (page 27)."

"You can write any content to a PDF that’s appropriate for your application—images, text, path drawing—and you can add links and encryption. For more information see "PDF Document Creation, Viewing, and Transforming" (page 177)."

这篇关于如何在 iOS 应用程序中以编程方式创建 PDF 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆