Package com.winnovative_software
Class PdfBookmarkOptions
java.lang.Object
com.winnovative_software.PdfBookmarkOptions
This class contains the necessary properties to control the bookmarks
creation in a PDF document
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the flag indicating if the HTML elements without text can be bookmarkedboolean
Gets the flag indicating if the automatic creation of bookmarks in PDF for the H1 to H6 HTML elements is enabled or notGets the default title to be used for bookmarks that don't have an associated textboolean
Gets the flag indicating if the bookmarks created in PDF for the HTML elements are arranged in a hierarchy based on the bookmark levels defined in HTMLString[]
Gets the array containing the selectors of the HTML elements to be bookmarkedint
Gets the maximum accepted length of the bookmark title string.void
setAllowDefaultTitle
(boolean allowDefaultTitle) Sets the flag indicating if the HTML elements without text can be bookmarked.void
setAutoBookmarksEnabled
(boolean autoBookmarksEnabled) Sets the flag indicating if the automatic creation of bookmarks in PDF for the H1 to H6 HTML elements is enabled or not.void
setDefaultTitle
(String defaultTitle) Sets the default title to be used for bookmarks that don't have an associated text.void
setHierarchicalBookmarks
(boolean hierarchicalBookmarks) Sets the flag indicating if the bookmarks created in PDF for the HTML elements are arranged in a hierarchy based on the bookmark levels defined in HTML.void
setHtmlElementSelectors
(String[] selectors) Sets an array containing the selectors of the HTML elements to be bookmarked.void
setMaxTitleLength
(int maxTitleLength) Sets the maximum accepted length of the bookmark title string.
-
Constructor Details
-
PdfBookmarkOptions
public PdfBookmarkOptions()
-
-
Method Details
-
autoBookmarksEnabled
public boolean autoBookmarksEnabled()Gets the flag indicating if the automatic creation of bookmarks in PDF for the H1 to H6 HTML elements is enabled or not- Returns:
- the flag value
-
setAutoBookmarksEnabled
public void setAutoBookmarksEnabled(boolean autoBookmarksEnabled) Sets the flag indicating if the automatic creation of bookmarks in PDF for the H1 to H6 HTML elements is enabled or not. By default the automatic bookmarks creation is disabled- Parameters:
autoBookmarksEnabled
- the flag value to set
-
hierarchicalBookmarks
public boolean hierarchicalBookmarks()Gets the flag indicating if the bookmarks created in PDF for the HTML elements are arranged in a hierarchy based on the bookmark levels defined in HTML- Returns:
- the flag value
-
setHierarchicalBookmarks
public void setHierarchicalBookmarks(boolean hierarchicalBookmarks) Sets the flag indicating if the bookmarks created in PDF for the HTML elements are arranged in a hierarchy based on the bookmark levels defined in HTML. By default this property is true- Parameters:
hierarchicalBookmarks
- the flag value to set
-
htmlElementSelectors
Gets the array containing the selectors of the HTML elements to be bookmarked- Returns:
- the array containing the selectors of the HTML elements to be bookmarked
-
setHtmlElementSelectors
Sets an array containing the selectors of the HTML elements to be bookmarked. For example, the selector for all the image elements is "img", the selector for all the elements with the CSS class name 'myclass' is "*.myclass" and the selector for the elements with the id 'myid' is "*#myid"- Parameters:
selectors
- the selectors to set
-
allowDefaultTitle
public boolean allowDefaultTitle()Gets the flag indicating if the HTML elements without text can be bookmarked- Returns:
- the flag value
-
setAllowDefaultTitle
public void setAllowDefaultTitle(boolean allowDefaultTitle) Sets the flag indicating if the HTML elements without text can be bookmarked. This property is true by default- Parameters:
allowDefaultTitle
- the flag value to set
-
defaultTitle
Gets the default title to be used for bookmarks that don't have an associated text- Returns:
- the default title to be used for bookmarks that don't have an associated text
-
setDefaultTitle
Sets the default title to be used for bookmarks that don't have an associated text. This property has effect only ifallowDefaultTitle()
is true. This property defaults to "Bookmark" text- Parameters:
defaultTitle
- the default title to be used for bookmarks that don't have an associated text
-
maxTitleLength
public int maxTitleLength()Gets the maximum accepted length of the bookmark title string. If a positive value is set for this property the bookmark title will be truncated if necessary- Returns:
- the maximum accepted length of the bookmark title string
-
setMaxTitleLength
public void setMaxTitleLength(int maxTitleLength) Sets the maximum accepted length of the bookmark title string. If a positive value is set for this property the bookmark title will be truncated if necessary.By default and the bookmark title will not be truncated- Parameters:
maxTitleLength
- the maximum accepted length of the bookmark title string to set
-