开发者

pdf parsing problem

hi im working on pdf viewer. i want to extract all the contents of the pdf. will cgpdgscanner get all the contents of pdf??

the apple documentati开发者_如何学JAVAon is very brief. its difficult to implement with the explanations given. and lots of googlin also leads to nowhere.

so can someone explain the use of the purpose and use of the following:

1.CGPDFOperatorTableRef

2.CGPDFOperatorTableSetCallback

3.CGPDFScannerRef

4.CGPDFContentStreamRef

once al this is done how to view the data that is got after parsing.

thanks in advance.


Its not a big deal to parse pdf content but what makes it more difficult is to highlight searched text in PDF.

For parsing do as posted on the below url.

http://www.random-ideas.net/posts/42

For exact reader get the below code (but it shows the clumsy logo)

https://github.com/mobfarm/FastPdfKit

Thanks


The CGPDFScanner will parse a PDF graphic content stream (page content or form XObject content). This is very low level PDF, you have to know the PDF specification in order to interpret the results of the parsing. The CGPDFScanner will call a method of yours every time it encounters an operator that you are interested in. The CGPDFOperatorTable stores the list of operators you want to be notified about. If you want to extract all content you have to fill this table with all PDF graphic operators. Each operator is associated with a method (a callback) that is called when the scanner find the operator in the PDF content stream.
The CGPDFScannerRef is the PDF scanner and CGPDFContentStreamRef is a PDF content stream, a stream associated with a PDF object. The content of this stream depends on the PDF object this stream is associated with.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜