PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
The steps to access a list of annotations and annotation objects are as follows:
This example shows how to access annotations:
var annotations: [CPDFAnnotation] = []
// Iterate over all pages
for i in 0..<document?.pageCount {
if let page = document.page(at: i) {
// terate through all the annotations on the page
annotations.append(contentsOf: page.annotations)
for annotation in annotations {
// Process each annotation
}
}
}NSMutableArray *annotations = [NSMutableArray array];
// Iterate over all pages
for (int i=0; i<document.pageCount; i++) {
CPDFPage *page = [document pageAtIndex:i];
// Iterate through all the annotations on the page
[annotations addObjectsFromArray:[page annotations]];
for (CPDFAnnotation *annotation in annotations) {
}
}