Skip to content

[FEATURE] : Not able to provide different colour to different form field in the PDF. #563

@sukhendu321

Description

@sukhendu321

Unidoc version: v3.61.0

fieldAppearance := annotator.FieldAppearance{OnlyIfMissing: true, RegenerateTextFields: true}

// specify a full set of appearance styles
fieldAppearance.SetStyle(annotator.AppearanceStyle{
	AutoFontSizeFraction: 0.70,
	FillColor:            model.NewPdfColorDeviceRGB(1, 1, 1),
	BorderColor:          model.NewPdfColorDeviceRGB(0, 0, 0),
	BorderSize:           2.0,
	AllowMK:              false,
	TextColor:            model.NewPdfColorDeviceRGB(0.5, 0.8, 0.8), // text color as normalized RGB values
})

// Populate the form data with appearance.
pdfReader.AcroForm.FillWithAppearance(fieldData, fieldAppearance)

@kellemNegasi i am trying to change different fieldData with different colour but it is changing all the fieldData colours.
Expected behaviour is to change specific fields with specific colour

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions