JPedal Java PDF library 4.70b22 API Documentation - http://www.jpedal.org

org.jpedal.objects.layers
Class PdfLayerList

java.lang.Object
  extended by org.jpedal.objects.layers.PdfLayerList

public class PdfLayerList
extends java.lang.Object


Field Summary
static java.lang.String deliminator
           
 
Constructor Summary
PdfLayerList()
           
 
Method Summary
 void addJScommand(java.lang.String name, java.lang.String js)
           
 boolean decodeLayer(java.lang.String name, boolean isID)
          Used internally only.
 boolean getChangesMade()
          show if decoded version match visibility flags which can be altered by user
 java.lang.Object[] getDisplayTree()
           
 java.util.Iterator getJSCommands()
           
 int getLayersCount()
          number of layers setup
 java.util.Map getMetaData()
           
 java.lang.String getNameFromRef(java.lang.String ref)
           
 java.lang.Object[] getOCGs()
          JS returns all the OCG objects in the document.
 java.lang.Object[] getOCGs(int page)
          JS Gets an array of OCG objects found on a specified page.
 void init(org.jpedal.objects.raw.PdfObject OCProperties, org.jpedal.objects.raw.PdfObject PropertiesObj, org.jpedal.io.PdfObjectReader currentPdfFile)
          add layers and settings to list
 boolean isLayerName(java.lang.String name)
          show if is name of layer (as opposed to just label)
 boolean isLocked(java.lang.String layerName)
           
 boolean isVisible(java.lang.String layerName)
           
 void setChangesMade(boolean flag)
          used by Javascript to flag that state has changed
 void setVisibleLayers(java.lang.String[] layerNames)
          will display only these layers and hide all others and will override any constraints.
 void setVisiblity(java.lang.String layerName, boolean isVisible)
           
 boolean setZoom(float scaling)
          switch on/off layers based on Zoom
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deliminator

public static java.lang.String deliminator
Constructor Detail

PdfLayerList

public PdfLayerList()
Method Detail

init

public void init(org.jpedal.objects.raw.PdfObject OCProperties,
                 org.jpedal.objects.raw.PdfObject PropertiesObj,
                 org.jpedal.io.PdfObjectReader currentPdfFile)
add layers and settings to list

Parameters:
OCProperties -
PropertiesObj -
currentPdfFile -

setChangesMade

public void setChangesMade(boolean flag)
used by Javascript to flag that state has changed

Parameters:
flag -

getMetaData

public java.util.Map getMetaData()

getDisplayTree

public java.lang.Object[] getDisplayTree()

setVisibleLayers

public void setVisibleLayers(java.lang.String[] layerNames)
will display only these layers and hide all others and will override any constraints. If you pass null in, all layers will be removed

Parameters:
layerNames -

decodeLayer

public boolean decodeLayer(java.lang.String name,
                           boolean isID)
Used internally only. takes name in Stream (ie MC7 and works out if we need to decode) if isID==true


setZoom

public boolean setZoom(float scaling)
switch on/off layers based on Zoom

Parameters:
scaling -

isVisible

public boolean isVisible(java.lang.String layerName)

setVisiblity

public void setVisiblity(java.lang.String layerName,
                         boolean isVisible)

isLocked

public boolean isLocked(java.lang.String layerName)

getChangesMade

public boolean getChangesMade()
show if decoded version match visibility flags which can be altered by user


isLayerName

public boolean isLayerName(java.lang.String name)
show if is name of layer (as opposed to just label)


getLayersCount

public int getLayersCount()
number of layers setup


getNameFromRef

public java.lang.String getNameFromRef(java.lang.String ref)

getOCGs

public java.lang.Object[] getOCGs()
JS returns all the OCG objects in the document.


getOCGs

public java.lang.Object[] getOCGs(int page)
JS Gets an array of OCG objects found on a specified page.

Parameters:
page - - (optional) The 0-based page number. If not specified, all the OCGs found in the document are returned. If no argument is passed, returns all OCGs listed in alphabetical order, by name. If nPage is passed, this method returns the OCGs for that page, in the order they were created.
Returns:
- An array of OCG objects or null if no OCGs are present.

addJScommand

public void addJScommand(java.lang.String name,
                         java.lang.String js)

getJSCommands

public java.util.Iterator getJSCommands()

JPedal Java PDF library 4.70b22 API Documentation - http://www.jpedal.org

JPedal Java PDF library 4.70b22 API Documentation - http://www.jpedal.org