Copy link to clipboard
Copied
I have run into a problem when using the addwatermarkfromtext.
I have used the method many times, but now I have been asked to add stamp with a copyright statement with "©" symbol in the cText field. When testing from the Javascript console it works perfectly, but when I save it as a .js file and run it as a folder level script (script at bottom) I get: Copyright thisCompany ©
The issue is the added character "Â"
I have tried changing fonts a few times but I get the same issue. Searching for people with this issue but I have found no solution.
Hopefully someone here can bestow some wisdom upon me.
this.addWatermarkFromText({
cText: 'Copyright thisCompany © ',
nStart: i,
nEnd: i,
nTextAlign: app.constants.align.left,
nVertAlign: app.constants.align.bottom,
nHorizAlign: app.constants.align.center,
nVertValue: -0.55,
cFont: "KozGoPr6N-Medium",
nFontSize: 30,
aColor: color.black,
Opacity: 1,
nScale: -0.75
});
Copy link to clipboard
Copied
Works fine for me. Make sure you use an editor where you can set the encoding, such as Notepad++, and set it to ANSI.
Alternatively, you can use the unicode escape character, like this:
cText: 'Copyright thisCompany \u00A9 ',
Copy link to clipboard
Copied
Works fine for me. Make sure you use an editor where you can set the encoding, such as Notepad++, and set it to ANSI.
Alternatively, you can use the unicode escape character, like this:
cText: 'Copyright thisCompany \u00A9 ',
Copy link to clipboard
Copied
Thanks for the fast reply, this solution worked perfectly!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more