Skip navigation
s_stuff
Currently Being Moderated

How to set Bookmark element to expand

Aug 23, 2010 12:49 PM

Hi All,

 

First I'll explain the solution so that you understand what I'm trying to accomplish.

 

The solution involves several PDF files and each one is linked by the bookmark using the following DDX:

 

<Bookmark>    
    <Action>    
          <Launch NewWindow="true">     
               <File Name="MyFile.pdf"/>    
          </Launch>   
     </Action>   
     <Title>Contents</Title>  
</Bookmark>

 

Each PDF file will contains the same bookmark hierarchy data which consist of several levels, therefore they contain the links to the other PDF files.  Each time one of the bookmark element is clicked the bookmark resets back to it's orginal state of collapsed since it is opening a new pdf file.

 

I'm trying to dynamically assemble a bookmark.xml file with a pdf document.  There are two things I want to accomplish through the bookmark.xml:

 

1.  Set one specific bookmark element to expanded when it's rendered

2.  Set the focus (or highlight) a specific bookmark element when it's rendered.

 

Basically each time a bookmark item is clicked I want to maintain the user's last selected bookmark item to be expanded when the new pdf file is displayed.

 

I've attached a sample pdf file in which I can manipulate the expanding and collapsing of the bookmark via javascript, I need to figure out how to do this via the xml file that defines the bookmark hierarchy and functions, since the bookmark is merged with the PDF via the Assembler DSC service.

 

Is this possible?  If yes what xml tag would accomplish this?  Please provide any suggestion or alternative solution.  Currently I have two alternative solution (html or flex UI) but this involves additional depencies outside of LiveCycle, I'd like to create a solution that is completely Adobe LiveCycle.

 

Thanks,

s_stuff

Attachments:
 
Replies
  • Currently Being Moderated
    Aug 26, 2010 5:31 AM   in reply to s_stuff

    You cannot insert the javascript code directly in a ddx. The javascript should be present in an input stream/file.

     

     

    The DDX would look more like this.

     

    <DDX xmlns="http://ns.adobe.com/DDX/1.0/">
      <PDF result="Untitled 1">
        <PDF source="sourcePDF1"/>
       <JavaScript source="Js1" name="anyUniqueName "/>
      </PDF>
      <?ddx-source-hint name="sourcePDF1"?>
    </DDX>

     

    Where,

    The sourcePDF1 is the input PDF file

     

    The Js1 is any input stream which contains the javascript. For example it can be a .txt file which contains the javascript that needs to be inserted into the resultant pdf.

     

    "I’m  not sure if I can put the entire function code to replace js1.  Is this  workaround doable.  How can I insert javascript via ddx? "

     

    So to answer your question,

     

    1) Create a file with the javascript code in it

    2) Use the javascript tag to pass the 'file with the javascript code'.

     

    The resultant file will contain the javascript code. Call the javascript code to expand the bookmarks.

     
    |
    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