Skip navigation
Techi Panda 207 posts
Apr 5, 2009
Currently Being Moderated

set annot contents to utf-8

Jul 23, 2012 6:55 AM

Hi experts I am trying to add Annot in the pdf. This code works fine. My problem is i want to add unicode characters in the contents. While I am trying with unicode the characters goes to junk or something. How do i set the character set of the annot in to UTF-8 format.

 

 

var annot = this.addAnnot

({

page: 0,

type: "Text",

author: "A. C. Robat",

point: [300,400],

strokeColor: color.yellow,

contents: "Need a little help with this paragraph.",

noteIcon: "Help"

});

 

Thanks in adveance

 
Replies
  • Currently Being Moderated
    Jul 23, 2012 8:47 AM   in reply to Techi Panda

    Acrobat annotations and the JS scripting engine are Unicode-aware and use UTF-8 as the default encoding scheme - you can simply type/paste your UTF-8 text into the console, but if you're writing a JS script file you need to save it with UTF-8 encoding instead of ANSI.

     

    There's no explicit method to change the encoding.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points