HeaderFooterBookmarksExportMode

Inheritance: java.lang.Object

public class HeaderFooterBookmarksExportMode

Specifies how bookmarks in headers/footers are exported.

Examples:

Shows to process bookmarks in headers/footers in a document that we are rendering to PDF.


 Document doc = new Document(getMyDir() + "Bookmarks in headers and footers.docx");

 // Create a "PdfSaveOptions" object that we can pass to the document's "Save" method
 // to modify how that method converts the document to .PDF.
 PdfSaveOptions saveOptions = new PdfSaveOptions();

 // Set the "PageMode" property to "PdfPageMode.UseOutlines" to display the outline navigation pane in the output PDF.
 saveOptions.setPageMode(PdfPageMode.USE_OUTLINES);

 // Set the "DefaultBookmarksOutlineLevel" property to "1" to display all
 // bookmarks at the first level of the outline in the output PDF.
 saveOptions.getOutlineOptions().setDefaultBookmarksOutlineLevel(1);

 // Set the "HeaderFooterBookmarksExportMode" property to "HeaderFooterBookmarksExportMode.None" to
 // not export any bookmarks that are inside headers/footers.
 // Set the "HeaderFooterBookmarksExportMode" property to "HeaderFooterBookmarksExportMode.First" to
 // only export bookmarks in the first section's header/footers.
 // Set the "HeaderFooterBookmarksExportMode" property to "HeaderFooterBookmarksExportMode.All" to
 // export bookmarks that are in all headers/footers.
 saveOptions.setHeaderFooterBookmarksExportMode(headerFooterBookmarksExportMode);

 doc.save(getArtifactsDir() + "PdfSaveOptions.HeaderFooterBookmarksExportMode.pdf", saveOptions);
 

Fields

FieldDescription
ALLBookmarks in all headers/footers are exported.
FIRSTOnly bookmark in first header/footer of the section is exported.
NONEBookmarks in headers/footers are not exported.
length

Methods

MethodDescription
fromName(String headerFooterBookmarksExportModeName)
getName(int headerFooterBookmarksExportMode)
getValues()
toString(int headerFooterBookmarksExportMode)

ALL

public static int ALL

Bookmarks in all headers/footers are exported.

FIRST

public static int FIRST

Only bookmark in first header/footer of the section is exported.

NONE

public static int NONE

Bookmarks in headers/footers are not exported.

length

public static int length

fromName(String headerFooterBookmarksExportModeName)

public static int fromName(String headerFooterBookmarksExportModeName)

Parameters:

ParameterTypeDescription
headerFooterBookmarksExportModeNamejava.lang.String

Returns: int

getName(int headerFooterBookmarksExportMode)

public static String getName(int headerFooterBookmarksExportMode)

Parameters:

ParameterTypeDescription
headerFooterBookmarksExportModeint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int headerFooterBookmarksExportMode)

public static String toString(int headerFooterBookmarksExportMode)

Parameters:

ParameterTypeDescription
headerFooterBookmarksExportModeint

Returns: java.lang.String