Frequently Asked Question
How to Export/Import annotations? (iOS)
Last Updated 11 months ago
This article shows you how to export and import annotations (ink, line, rect, ellipse, note) from a page to another.
You need a premium license.
//get first page PDFPage *page1 = [m_doc page:0]; [page1 objsStart]; //get last added annotation PDFAnnot *annot = [page1 annotAtIndex:([page1 annotCount] - 1)]; //save annotation data and export PDF_RECT rect; [annot getRect:&rect]; unsigned char buf[1024]; [annot export:buf :sizeof(buf)]; //get second page PDFPage *page2 = [m_doc page:1]; //import annotation to the second page NSData *data = [NSData dataWithBytes:buf length:sizeof(buf)]; [page2 importAnnot:&rect :[data bytes] :data.length];
You can change the buf size based on your needs.