How can I edit PDF files in an iOS application?

后端 未结 1 1924
[愿得一人]
[愿得一人] 2020-12-03 06:30

In my iPhone / iPad application, I show a person\'s medical reports in the form of a PDF. I have saved the reports in the documents directory and am reading them from there.

相关标签:
1条回答
  • 2020-12-03 06:54

    Editing PDF directly on iPad/iPhone is a rather big job because the standard API only supports showing it (and only a bit more.) If you want to do anything more, you need to invest a huge amount of time to implement generic pdf handling code.

    There is an open-source library handling these, e.g. this one. I don't know if it fits your needs, though.

    A better idea, in my opinion, is to create a native UI showing the data contained in the PDF file using the standard Cocoa-Touch UIKit and create the PDF once the user is done with it so that the user can export it back. That way, you don't have to write a complicated PDF handling code.

    In any case, it's not a good idea to show generic PDF on iPhone, because the screen size is so small (iPad is a different question, especially if you expect the user to be familiar with the particular format of your pdf.). A dedicated UI would be much better.

    0 讨论(0)
提交回复
热议问题