Stay organized with collections
Save and categorize content based on your preferences.
PdfAnnotation
abstract class PdfAnnotation
Represents a PDF annotation on a page of a PDF document. This abstract class provides a base implementation for different types of PDF annotations such as text (FreeTextAnnotation
), highlight (HighlightAnnotation
) etc
Summary
Public methods |
open Int |
Returns the type of the annotation.
|
Public methods
getPdfAnnotationType
open fun getPdfAnnotationType(): Int
Returns the type of the annotation.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],[],null,["# PdfAnnotation\n\nAdded in [S Extensions 18](https://developer.android.com/sdkExtensions)\n\nPdfAnnotation\n=============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/graphics/pdf/component/PdfAnnotation \"View this page in Java\") \n\n```\nabstract class PdfAnnotation\n```\n\n|---|---------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.graphics.pdf.component.PdfAnnotation](#) |\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [FreeTextAnnotation](/reference/kotlin/android/graphics/pdf/component/FreeTextAnnotation), [HighlightAnnotation](/reference/kotlin/android/graphics/pdf/component/HighlightAnnotation), [StampAnnotation](/reference/kotlin/android/graphics/pdf/component/StampAnnotation) |---------------------------------------------------------------------------------------------|------------------------------------------------------| | [FreeTextAnnotation](/reference/kotlin/android/graphics/pdf/component/FreeTextAnnotation) | Represents a free text annotation in a PDF document. | | [HighlightAnnotation](/reference/kotlin/android/graphics/pdf/component/HighlightAnnotation) | Represents a highlight annotation in a PDF document. | | [StampAnnotation](/reference/kotlin/android/graphics/pdf/component/StampAnnotation) | Represents a stamp annotation in a PDF document. | |\n\nRepresents a PDF annotation on a page of a PDF document. This abstract class provides a base implementation for different types of PDF annotations such as text ([FreeTextAnnotation](/reference/kotlin/android/graphics/pdf/component/FreeTextAnnotation)), highlight ([HighlightAnnotation](/reference/kotlin/android/graphics/pdf/component/HighlightAnnotation)) etc\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getPdfAnnotationType](#getPdfAnnotationType())`()` Returns the type of the annotation. |\n\nPublic methods\n--------------\n\n### getPdfAnnotationType\n\nAdded in [S Extensions 18](https://developer.android.com/sdkExtensions) \n\n```\nopen fun getPdfAnnotationType(): Int\n```\n\nReturns the type of the annotation.\n\n| Return ||\n|----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | The annotation type. See [PdfAnnotationType](/reference/kotlin/android/graphics/pdf/component/PdfAnnotationType) for possible values. Value is [android.graphics.pdf.component.PdfAnnotationType#UNKNOWN](/reference/kotlin/android/graphics/pdf/component/PdfAnnotationType#UNKNOWN:kotlin.Int), [android.graphics.pdf.component.PdfAnnotationType#FREETEXT](/reference/kotlin/android/graphics/pdf/component/PdfAnnotationType#FREETEXT:kotlin.Int), [android.graphics.pdf.component.PdfAnnotationType#HIGHLIGHT](/reference/kotlin/android/graphics/pdf/component/PdfAnnotationType#HIGHLIGHT:kotlin.Int), or [android.graphics.pdf.component.PdfAnnotationType#STAMP](/reference/kotlin/android/graphics/pdf/component/PdfAnnotationType#STAMP:kotlin.Int) |"]]