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

set annot contents to utf-8  in VB

Jul 26, 2012 1:24 AM

Hi Experts

 

here is what i am doing.

 

step 1

 

Read text from input text file formated in UTF-8 encoding.

 

step 2

 

Stores the line of text to varible (includes greek letters and alpabets)

 

step 3

 

Adding annots to the pdf and set the stored value as contents

 

I am using windows Acrobat 7 and VB. The problem is while setting the annots contents the alpabets and numbers appears fine but the greek charactes are converted to junk. I have seen the option in javascript scripting guide RichContents it works fine in Javascript console in acrobat.

 

Is there any way to apply RichContents to the annot property using VB or how I have to deal with unicode characters to be shown in comment.

 

Thanks in advance

 
Replies
  • Currently Being Moderated
    Jul 26, 2012 10:41 AM   in reply to Techi Panda

    Hi,

    if you have the javascript for that you can simple execute it from vb via formApi,

    Something like: 

    Set App = CreateObject("Acroexch.app")

    Set AForm = CreateObject("AFormAut.App")  'from AFormAPI

    AForm.Fields.ExecuteThisJavaScript "app.alert("My jsCode);"

     

    HTH, Reinhard

     
    |
    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