You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above methods I used are changing border color when set to BorderColor: model.NewPdfColorDeviceRGB(1, 0, 0).
But the same is not happening when I try to change text color.
Welcome! Thanks for posting your first issue. The way things work here is that while customer issues are prioritized, other issues go into our backlog where they are assessed and fitted into the roadmap when suitable. If you need to get this done, consider buying a license which also enables you to use it in your commercial products. More information can be found on https://unidoc.io/
Hi @pranavbansod, Thank you for reporting this issue. Currently, there is no rich text support for form field values in UniPDF, which means this is a feature request. We have created a ticket for this, and we will implement it in the future. We will write an update on this issue as soon as the feature gets released.
Hi @pranavbansod , This feature has been implemented in Unipdf version v3.61.0.
You can choose a custom text color for text fields as follows.
fieldAppearance:= annotator.FieldAppearance{OnlyIfMissing: true, RegenerateTextFields: true}
// specify a full set of appearance stylesfieldAppearance.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(fdata, fieldAppearance)
Description
Unidoc version: 3.57.0
I'm trying to fill pdf form from a json. I want to change text color of the new values which are filled from the Json.
Reference Code: https://github.com/unidoc/unipdf-examples/blob/master/forms/pdf_form_fill_json.go
I'm trying to set FillColor of AppearanceStyle to change the color. But it is not changing.
I tried using different methods to change color
The above methods I used are changing border color when set to
BorderColor: model.NewPdfColorDeviceRGB(1, 0, 0)
.But the same is not happening when I try to change text color.
Expected Behavior
It should change the text color.
Attachments
Here is the code snippet:
The text was updated successfully, but these errors were encountered: