在PDF中创建具有不同行的多个表

时间:2016-05-27 07:54:14

标签: ios objective-c pdf pdf-generation

我想在PDF中创建一个包含不同行的多个表,其中的数据来自我的iPhone应用程序。我怎么能这样做?

1 个答案:

答案 0 :(得分:0)

检查https://github.com/yfujiki/PDFRenderer 您可以将数据从应用程序传递到PDF并绘制任何内容。

我在旧应用程序中使用它,它工作正常且易于使用。

使用变量将字符串绘制到PDF的示例:

If WorkbookIsOpen(file) Then
    MsgBox "Import file is open. " & vbNewLine & _
    "Please close the file and try again", vbCritical + vbOKOnly, "Import Failed"
    Exit Sub
End If

伟大的Raywenderlich教程:

https://www.raywenderlich.com/6581/how-to-create-a-pdf-with-quartz-2d-in-ios-5-tutorial-part-1

要创建不同的行,只需使用drawLine方法绘制线条,您也可以绘制图像等。