ComPDF React Native - v3.0.0
    Preparing search index...

    Class CPDFLineAnnotation

    CPDFLineAnnotation

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Update line annotation properties with type safety

      Parameters

      • updates: Partial<
            Pick<
                CPDFLineAnnotation,
                | "title"
                | "content"
                | "borderColor"
                | "borderAlpha"
                | "fillColor"
                | "fillAlpha"
                | "borderWidth"
                | "lineHeadType"
                | "lineTailType"
                | "dashGap",
            >,
        >

        Partial object containing properties to update

      Returns this

      this instance for chaining

      lineAnnotation.update({
      title: 'Updated Title',
      content: 'Updated content',
      borderColor: '#FF0000',
      borderAlpha: 200,
      borderWidth: 2,
      fillColor: '#00FF00',
      fillAlpha: 150,
      lineHeadType: CPDFLineType.ARROW,
      lineTailType: CPDFLineType.NONE
      });
      await document.updateAnnotation(lineAnnotation);
    • Returns Omit<CPDFLineAnnotation, "createDate" | "update" | "toJSON"> & {
          createDate?: number;
          borderColor: string;
          borderAlpha: number;
          fillColor: string;
          fillAlpha: number;
          borderWidth: number;
          lineHeadType: string;
          lineTailType: string;
          points: number[][];
          dashGap: number;
      }

    Properties

    Annotation type identifier

    title: string

    Annotation title

    page: number

    The page number where the note is located

    content: string

    annotation content.

    uuid: string

    annotation uuid.

    createDate: Date | null = null

    annotation create date.

    markState: CPDFAnnotationMarkState = CPDFAnnotationMarkState.UNMARKED

    annotation mark state.

    reviewState: CPDFAnnotationReviewState = CPDFAnnotationReviewState.NONE

    annotation review state.

    rect: CPDFRectF | null = null

    annotation rect.

    borderColor: string

    The color of the border.

    borderAlpha: number

    The alpha of the border.

    fillColor: string

    The color of the fill.

    fillAlpha: number

    The alpha of the fill.

    borderWidth: number

    The width of the border.

    lineHeadType: string

    The type of the line head.

    lineTailType: string

    The type of the line tail.

    points: number[][]

    The points defining the line annotation.

    dashGap: number