PDA

View Full Version : Parse PDF on MAC




sheetal.pawar
Aug 26, 2010, 12:32 AM
Hi,

I need to search a word in a PDF file. Currently I am getting only the page on which the word exists. But the exact location of the word is not known and hence cannot highlight the word.
Are there any PDF parsers available for MAC which can give the position of the word to be searched ?
Or any PDF parsers which will convert PDF file text in XML format on MAC ?



GorillaPaws
Aug 26, 2010, 12:37 AM
Did you check the PDF Kit docs (http://developer.apple.com/mac/library/documentation/GraphicsImaging/Conceptual/PDFKitGuide/PDFKit_Prog_Tasks/PDFKit_Prog_Tasks.html#//apple_ref/doc/uid/TP40001863-CH202-DontLinkElementID_20)?

Also, typically MAC refers to Media Access Control (as in MAC Address); Mac is the computer. It may seem pedantic, but using the proper spellings can greatly reduce confusion in some cases.

Sydde
Aug 26, 2010, 01:04 AM
Also, typically MAC refers to Media Access Control (as in MAC Address); Mac is the computer. It may seem pedantic, but using the proper spellings can greatly reduce confusion in some cases.

All the letters in PC are capitalized, so some might think it should be the same for Macs. As though it were some sort of Macronym.

sheetal.pawar
Aug 26, 2010, 05:02 AM
Thanks for the reply and sorry for the confusion. I meant Mac OS.

At times the PDF text is encoded in some format. Will this search decode the text also ?
In the PDF kit doc nothing is mentioned on the decoding part.

sheetal.pawar
Aug 26, 2010, 05:30 AM
This will work on Mac machines, but will the same APIs work on ipad ?

wrldwzrd89
Aug 26, 2010, 06:36 AM
You can do tons of stuff with PDFs on iOS too! The relevant docs are here: http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_pdf_scan/dq_pdf_scan.html#//apple_ref/doc/uid/TP30001066-CH220-TPXREF101

robvas
Aug 26, 2010, 07:56 AM
Thanks for the reply and sorry for the confusion. I meant Mac OS.


While we're getting specific, Mac OS would refer to classic, and Mac OS X would refer to what Macs run these days ;)

sheetal.pawar
Aug 27, 2010, 12:36 AM
You can do tons of stuff with PDFs on iOS too! The relevant docs are here: http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_pdf_scan/dq_pdf_scan.html#//apple_ref/doc/uid/TP30001066-CH220-TPXREF101

The APIs mentioned in the link are used. I am able to get the page number on which the search string exists and also able to display the page. But I am not able to highlight the exact search string on the page and bring the document visibility to that string.

ytk
Aug 27, 2010, 03:42 AM
All the letters in PC are capitalized, so some might think it should be the same for Macs. As though it were some sort of Macronym.

What do you mean? Everybody knows MAC stands for "Mouse Activated Computer". ;)