如何在iOS应用程序中以编程方式创建PDF文件?

问题描述:

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

How to generate a PDF file on a user action?

请参见,了解如何创建PDF图形上下文.

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

一些注意事项:

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

"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)."

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

"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)."