Hi Emanuele,
I am using the given method to add the image
// Create the cache file
NSString *tp = NSTemporaryDirectory();
tp = [tp stringByAppendingPathComponent:@"cache.dat"];
[m_doc setCache:tp];
// Create the PDFPage instance of the current page
PDFPage *page = [m_doc page:m_cur_page];
// Create the CGImageRef of the image
CGImageRef ref = [[UIImage imageWithData:imageData] CGImage];
//NSString *path = @"path_to_image";
//PDFDocImage *i = [m_doc newImageJPEG:path];
// Get PDFDocImage instance from CGImageRef (keeping alpha channel)
PDFDocImage *i = [m_doc newImage:ref :YES];
// Define the image rect
PDF_RECT rect;
rect.left = 100;
rect.right = 157;
rect.top = 100;
rect.bottom = 157;
// Add the image
[page addAnnotBitmap:i :&rect];
// Re-render the current page
[m_view vRenderSync:m_cur_page];
[self refresh];
Here i am getting one problem, only with the rect used in the method the image is plotted at the bottom left corner of the page.
When i change any of the rect value the image is not seen.
Can you please explain me the significance of the Rect or what values should i provide to the rect?
I need to add the image at the point where i have long pressed on the pdf.