How to display PDF (w / hyperlinks) in an iPhone application such as GoodReader?

All I need to know is how to put the PDF page in a UIWebView, and then get the URL value (in NSString) of the link when clicked. Can anyone suggest their knowledge of this? Thanks in advance.

+3
source share
2 answers

Most iPhone PDF readers use CGPDF to render PDF content.

To implement features such as hyperlinks (AFIK hyperlinks in PDF format are executed using the "annotation link" tag, but there may be another way), the PDF viewer uses the CGPDF API to scan / analyze the PDF content stream for this page, pull out any data, and then implement support for this feature.

So, for hyperlinks, the viewer can use CGPDF to display the page in the view. He will also use CGPDF to scan a page that is looking for link annotations and pull out any attributes it needs (content, destination, coordinates, etc.). It will implement a touch handler for the view and any code executed when the user listens to the hyperlink.

0
source

, PDF UIWebView.

0

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


All Articles