[Bug] CustomStamps exports an invalid textColor in case of the default white text color
WebViewer version 10.9.0
The current behavior When I export the custom stamps as json and import them again, stamps with the default font colour white lose their font colour.
The expected behavior Exported stamps can be reimported without changes.
Steps to reproduce
Create to Stemps. One with the default white text color and one with another color:
The JSON looks like this.
[
{
"title": "Draft1",
"subtitle": "[$currentUser] DD/MM/YYYY h:mm A",
"color": "#4F9964",
"id": "68a51049-d4c3-2212-ea4f-fe8e4ca6421c",
"font": "Helvetica",
"bold": true,
"italic": false,
"underline": false,
"strikeout": false,
"textColor": { "R": 255, "G": 255, "B": 255, "A": 1 }
},
{
"title": "Draft",
"subtitle": "[$currentUser] DD/MM/YYYY h:mm A",
"color": "#2A85D0",
"id": "06893209-4687-da3b-2713-a53f186d62b8",
"font": "Helvetica",
"bold": true,
"italic": false,
"underline": false,
"strikeout": false,
"textColor": "#ca9999"
}
]
After I reimport the stamp, the white texted Stamp has an invisible text.
If I fix the textColor to #FFFFFF, the stamp is correct.
I think, the problem maybe located here: https://github.com/PDFTron/webviewer-ui/blob/28a787e6ba84cce7c2bcb0de978d2ecd5bf58e4e/.storybook/static/assets/customStamps.js#L84C7-L89C8
Hi @uwohlfeil - thanks for the report. When this gets fixed we will let you know so you can pull the latest changes.
Hello @uwohlfeil, this issue is fixed in our latest version 11.5. Please try it out and let us know if there's any issues.
Hello @uwohlfeil, this issue is fixed in our latest version 11.5. Please try it out and let us know if there's any issues.
Hello @bollain,
I just test it, and it seems to be the same problem. But I do not have the latest 11.5.0 version.
Do I have to update to the latest 11.5.0 version?
Hello @uwohlfeil,
We weren't able to reproduce this issue on 11.5. There is only one version of 11.5. Can you try testing with the following code to get and set the stamps?
const stampTool = WebViewer.getInstance().Core.documentViewer.getTool(WebViewer.getInstance().Core.Tools.ToolNames.RUBBER_STAMP);
const stamps = stampTool.getCustomStamps();
stampTool.setCustomStamps(stamps);
https://github.com/user-attachments/assets/847c4898-d4ef-4019-a16c-ce0144b4fa32
https://github.com/user-attachments/assets/5fb09f86-4fb4-4d7a-a295-0abe52a18b60