Skip to content

Phase 7: Annotations and Forms #8

@tlkahn

Description

@tlkahn

Goal

Read, create, and modify annotations and form fields. Fill forms and save.

Tasks

  • Add annotation FFI: FPDFPage_GetAnnotCount, FPDFPage_GetAnnot, FPDFAnnot_GetSubtype, FPDFAnnot_GetRect, FPDFAnnot_GetStringValue, FPDFAnnot_SetRect, FPDFAnnot_SetStringValue, FPDFPage_CreateAnnot, FPDFPage_RemoveAnnot
  • Add form FFI: FPDFDOC_InitFormFillEnvironment, FPDFDOC_ExitFormFillEnvironment, FPDFAnnot_GetFormFieldType, FPDFAnnot_GetFormFieldName, FPDFAnnot_GetFormFieldValue, FPDFAnnot_SetFormFieldValue, FPDFAnnot_IsChecked
  • Implement AnnotationRef, AnnotationType, AnnotationData
  • Implement annotation read: page_annotations(), annotation_type(), annotation_bounds(), annotation_contents()
  • Implement annotation write: create_annotation(), set_annotation_contents(), delete_annotation()
  • Implement form field read: page_form_fields(), form_field_type(), form_field_name(), form_field_value()
  • Implement form field write: set_form_field_value(), set_form_field_checked()
  • Integrate form handle into Document drop ordering (form before pages before document)
  • Tests: read annotations from test PDFs, create annotations, fill form fields, save and verify
  • Write examples/form_fill.rs

Exit Criterion

Can read, create, and modify annotations. Can fill form fields and save.

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions