Skip navigation
linopasc
Currently Being Moderated

Problems with icon object

Apr 14, 2012 1:40 AM

Tags: #acrobat_professional #icons_object

Hi! I hope someone can help me with the icons object.

 

 

When I use the following code (document level) in a PDF file  I created (with Acrobat 8)

 

app.alert (this.icons.length)

try {

 

app.alert (this.icons[0].name)

}

catch(e)

 

{

 

for (var i in e)

app.alert(i +":"+e[i])

}

 

I get 8 for the length and the error message

 

this.icons[0] has no properties

 

This happens for this.icons[1].name, ..... this.icons[7].name

 

Although there should be eigth icons I can't get any name.

 

Furthermore if I use app.alert(this.icons) I get  the following string ",,,,,,,". There is a simple way to remove this corrupted (I think) object?

 

Sorry for my bad english

Thank you, linopasc

 
Replies
  • George Johnson
    9,232 posts
    Aug 11, 2002
    Currently Being Moderated
    Apr 14, 2012 10:18 AM   in reply to linopasc

    Did you attempt to add document icons in the first place? If so, what method did you use? Can you post the file somewhere so we can take a look at the file?

     
    |
    Mark as:
  • George Johnson
    9,232 posts
    Aug 11, 2002
    Currently Being Moderated
    Apr 16, 2012 11:32 AM   in reply to linopasc

    Acrobat has a document icon related bug where it removes all icons when a Save As operation is performed. The workaround is to place them in buttons as soon as you import them. These buttons can be hidden and thier icons can be retrieved using the buttonGetIcon method.

     
    |
    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