How to edit PDF files in iOS app?

In my iPhone / iPad app, I display the person’s medical reports in PDF form. I saved the reports in the document catalog and read them from there.

I want the user to be able to add or edit comments on these PDF files, and also be able to select specific sections in PDF format. After editing, the application should be able to save the PDF back to the document directory.

Is this possible in an iOS app? If so, how? Is this a challenge for Core Graphics?

+6
source share
1 answer

Editing PDF directly on the iPad / iPhone is a pretty big job, because the standard API supports displaying it (and just a little more). If you want to do something else, you need to invest a huge amount of time to implement a common pdf processing code.

There is an open source library that handles these, for example. this one . However, I do not know if this suits your needs.

The best idea, in my opinion, is to create your own user interface that displays the data contained in the PDF file using the standard Cocoa -Touch UIKit and create a PDF file after the user is created with it so that the user can export it back. Thus, you do not need to write complex PDF processing code.

In any case, it is not recommended to show the general PDF on the iPhone, because the screen size is so small (iPad is another question, especially if you expect the user to be familiar with the specific format of your pdf file.). Special user interface will be much better.

+5
source

Source: https://habr.com/ru/post/893695/


All Articles