Analysing PDF contents

Discussion in 'Mac Programming' started by superscape, Aug 27, 2014.

  1. superscape, Aug 27, 2014
    Last edited: Aug 27, 2014

    superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #1
    Hi,

    As part of a Mac OS X app (in Objective-C) I need to be able analyse a PDF and determine some characteristics. PDFKit is quite limited and I'm not sure that CGPDF is going to be much better unless I'm missing something when looking at the documentation.

    I need to find out things like...

    Minimum font size used
    Minimum line thickness

    ...and so on. Does anyone know any third party frameworks/classes that could help, or any clever way I've overlooked?

    Thanks
     
  2. subsonix macrumors 68040

    Joined:
    Feb 2, 2008
    #2
    PDFKit is, according to Apple a subframework of Quartz, so I do think you can get a lot more details from CGPDF* type functions.

    https://developer.apple.com/library.../dq_pdf_scan/dq_pdf_scan.html#//apple_ref/doc
     
  3. superscape thread starter macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #3
    Yeah, thanks for that.

    I'm coming to the conclusion that CGPDF is going to be the way to go. Just looks like one heck of a learning curve! I was hoping someone would have a nice, user friendly wrapper round it. CGPDF documentation here I come...
     
  4. aly macrumors member

    Joined:
    Jul 3, 2006
    Location:
    Scotland
    #4
    Depending on your budget you could check out Debenu Quick PDF Library (www.debenu.com). I use the Windows version on a daily basis in work but they recently released a OS X version. I haven't used the OS X version myself but the PC one can do all you ask and is very easy to use.
     
  5. superscape thread starter macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #5
    Thanks for the tips, folks.

    Just for the record, and in case anyone having similar problems stumbles across this thread in future, I ended up going the CGPDF route after all. Taking a thorough look at:

    https://github.com/KurtCode/PDFKitten

    ..and the PDF specs over at Adobe set me on the right tracks. I'll warn those following in my footsteps though that its a complicated project!
     

Share This Page