Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Issue using Addwatermarkfromtext with copyright symbol in cText

New Here ,
Oct 22, 2021 Oct 22, 2021

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
});

TOPICS
Edit and convert PDFs , JavaScript
977
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Oct 22, 2021 Oct 22, 2021

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 ',

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 22, 2021 Oct 22, 2021

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 ',

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 22, 2021 Oct 22, 2021
LATEST

Thanks for the fast reply, this solution worked perfectly!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines