Document Annotation Implementation in Mobile App

TRUETECH is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Document Annotation Implementation in Mobile App
Medium
~3-5 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1054
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Implementing Document Annotation in Mobile Applications

A PDF editor on mobile isn't just drawing over an image. Annotations must embed into the PDF file structure, scale without losing position when zooming, and save so that Adobe Acrobat can read them. This is where most implementations fail.

Annotation Types and Technical Implementation

PDF 1.7 standard (ISO 32000) defines annotation types: /Text (sticky note), /Highlight, /Underline, /StrikeOut, /Ink (freehand drawing), /FreeText, /Square, /Circle, /Stamp. Implementing them as an overlay over UIImageView is an antipattern: on page re-render, positions drift. Annotations must store in PDF coordinate space (PDF points, not screen pixels).

iOS. PDFKit (available since iOS 11)—native framework with PDFAnnotation. Create annotation:

let annotation = PDFAnnotation(bounds: bounds, forType: .highlight, withProperties: nil)
annotation.color = UIColor.yellow.withAlphaComponent(0.5)
page.addAnnotation(annotation)

Coordinates in bounds are in the PDF page coordinate space. Converting from touch coordinates: pdfView.convert(touchPoint, to: page). For Ink annotation, collect [UIBezierPath] and pass via annotation.paths. Saving: document.write(to: url)—embeds annotations into the PDF structure.

Android. No native PDF editor. Common approaches: PdfiumAndroid for rendering + custom Canvas overlay with saving via iText7 or PDFBox. iText7 (Community, AGPL) can add annotations to existing PDF via PdfAnnotation. Commercial option—PdfTron/Apryse SDK: full ISO 32000 standard, offline capable.

Flutter. syncfusion_flutter_pdfviewer + syncfusion_flutter_pdf (commercial for production) or pdfx for rendering + manual implementation via CustomPainter. No free complete solution—either paid SDK or native plugin.

The Hardest Part: Ink Annotations and Stylus

Freehand drawing with finger works fine. Stylus (Apple Pencil, Samsung S Pen) is different.

On iOS, Apple Pencil provides UITouch.force and UITouch.azimuthAngle. For realistic drawing: vary line width by pressure, apply smoothing via Catmull-Rom spline between points. Without smoothing, fast strokes look jagged—UITouch doesn't capture all intermediate points.

Rendering optimization: don't redraw the entire page on each touchesMoved. Use setNeedsDisplayInRect with bounding box of the last segment. On complex documents, full redraw drops FPS to 20–30; incremental maintains 60.

Text Highlighting (Highlight) Over PDF

Correct highlighting requires knowing word coordinates in the PDF. PDFPage.selectionForRange and PDFSelection provide PDFPage.characterBounds(at:) for each character. Draw highlight not as a single rectangle for the entire selection, but as a set of rectangles per line—otherwise multiline selections appear as one wide block instead of neat strips.

Export and Compatibility

After editing, users expect a PDF that opens in any reader. PDFKit.document.write(to:) on iOS guarantees this. On Android, iText7 writes standard annotations. Issues arise with custom stamps and SVG images—these need rasterization before embedding.

Sharing: UIActivityViewController on iOS, FileProvider + Intent.ACTION_SEND on Android.

Timeline

Basic annotation set (highlight, underline, freetext, ink) on one platform—3–4 days. Full editor with stylus support, device synchronization, and cloud storage—2–3 weeks.