最有由於一些個人需要,需要對PDF的內容進行提取,然後在網上找了好多都是要付費的,或者不能完整轉換的,然後,我就發散的考慮,如果在iOS中,怎麼來實現類似的需求
以下是一些stackoverflow上的答案
How can I get the text from PDF page?
How to Convert pdf page to text file in ios application
Extracting pdf text in Objective C
Get text from a pdf in NSString
How To Create a PDF with Quartz 2D in iOS 5 – Part 1
更新時間 2019年04月02日
蘋果在iOS11之後公佈了PDFKit,可以使用PDFPage
,PDFSelection
等類來實現預期效果
Reference
https://www.hackingwithswift.com/example-code/libraries/how-to-extract-text-from-a-pdf-using-pdfkit
https://www.hackingwithswift.com/example-code/libraries/how-to-extract-text-from-a-pdf-using-pdfkit