Hi,
here is an example to add a picture in the current page (you can add this method in PDFView class):
- (void)vAddImage:(NSString *)image withRect:(PDF_RECT)rect
{
NSString *tp = NSTemporaryDirectory();
tp = [tp stringByAppendingPathComponent:@"cache.dat"];
[m_doc setCache:tp];
PDFPage *page = [m_doc page:m_cur_page];
CGImageRef ref = [[UIImage imageNamed:image] CGImage];
[page addAnnotBitmap:ref :NO :&rect];
[m_view vRenderSync:m_cur_page];
[self refresh];
[m_doc save];
}
the first part set the cache file (is needed to add an image).
I tried that method with this simple code:
PDF_RECT rect;
rect.left = 100;
rect.right = 57;
rect.top = 100;
rect.bottom = 57;
[m_view vAddImage:@"icon57.png" withRect:rect];