0

I am building an iOS application which consumes PDF documents and displays them to a user on their device, I need to allow the user to be able to interact with the content of the PDF by placing buttons over sections of the PDF.

To do this I need the coordinates of where the button should be placed within the PDF file view.

My initial thoughts were a web application using Javascript, PHP and MySQL would need to be created to allow my client to 'Draw' the buttons on to the PDF's and that this process would generate the coordinates needed and save them in a database.

After A LOT of googling I haven't found anything that does what I need so it looks like I will have to build something but I am stuck as what and where to start.

So the question is does anyone know of or can suggest a solution to the above that might get me started down the right path?

N.B. I did ask a similar question but got marked down for vagueness so I have re asked here with more detail.

4

1 回答 1

1

我实际上构建了一个与此非常相似的系统,尽管我无法与您分享代码。我能做的就是告诉你它是如何工作的。

正如您所建议的,Web 应用程序可以让您将项目放置在您想要的位置,然后将其捆绑到一个 JSON 文件中,该文件以点为单位描述每个项目的位置。然后,我们使用滚动视图内的 CATiledLayer 渲染 PDF,并将渲染的按钮/资产放在顶部。

我认为解决它的最佳方法是考虑如何在客户端实现它,然后在您对使用虚拟数据显示/渲染事物的方式感到满意时转移到服务器端。您目前如何显示您的 PDF?如果你正在使用一个UIWebView东西会变得更加困难。

于 2012-12-18T17:09:44.330 回答