5

I need to annotate a PDF in my application. Is there any API for PDF annotation in iPhone/iPad ? Any suggestions?

CharlesB
  • 86,532
  • 28
  • 194
  • 218
user465125
  • 109
  • 2
  • 9

4 Answers4

2

You could use the PoDoFo Library to add, read or delete the Annotations. But you will need to write your own viewer to display the pdf including the annotations.

I recently wrote a simple viewer for the iPad with the integration of the PoDoFo Library. You can find the very simple sample code on GitHub. There you can work with Square and FreeText annotations.

el flex
  • 246
  • 2
  • 10
  • have you added a way to annotate widget annotations? – Qamar Suleiman Jun 09 '13 at 07:18
  • No, I don't work on this project at the moment. I think it should be possible with podofo, but you'll need to spend a lot of time as this Annotation type is not implemented yet in podofo. – el flex Jun 11 '13 at 22:36
2

I created an open source framework for PDF annotation in IOS in GitHub. It supports both iPhone and iPad. Please check it out here.

lazyprogram
  • 139
  • 1
  • 4
2

You can draw an existing PDF onto a new PDF graphics context and then add whatever you like. See the answer to a similar question for iPhone.

Community
  • 1
  • 1
Obliquely
  • 7,002
  • 2
  • 32
  • 51
1

No there is none, but you can probably create an array of UITextViews, with a custom background, as stickies or something like that.

You can make a UITextView with a custom background like so:

UITextView *textView = [[UITextView alloc]initWithFrame: window.frame];
    textView.text = @"Notes";
    UIImageView *imgView = [[UIImageView alloc]initWithFrame: textView.frame];
    imgView.image = [UIImage imageNamed: @"myImage.jpg"];
    [textView addSubview: imgView];
    [textView sendSubviewToBack: imgView];
    [window addSubview: textView];

And then you can set the position with:

textView.position = CGPointMake(xcoord, ycoord);
  • plz look at "iAnnotate","GoodReader" applications. seems it is usinng any PDF API for annotation i am looking for same API which can be used to implement word search, highlight, add notes, etc in PDF document. – user465125 Oct 21 '10 at 06:56
  • @user: They didn't necessarily use an API. They could have done it themselves. –  Oct 21 '10 at 22:10