Example usage for org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline PDOutlineItem setTextColor

List of usage examples for org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline PDOutlineItem setTextColor

Introduction

In this page you can find the example usage for org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline PDOutlineItem setTextColor.

Prototype

public void setTextColor(Color textColor) 

Source Link

Document

Set the RGB text color for this node.

Usage

From source file:org.pdfsam.pdfbox.component.PDFBoxOutlineUtils.java

License:Open Source License

/**
 * Copies the dictionary from the given {@link PDOutlineItem} to the destination one
 * //from   w  ww.  j a v  a 2s  .co  m
 * @param from
 * @param to
 */
public static void copyOutlineDictionary(PDOutlineItem from, PDOutlineItem to) {
    to.setTitle(from.getTitle());
    to.setTextColor(from.getTextColor());
    to.setBold(from.isBold());
    to.setItalic(from.isItalic());
    if (from.isNodeOpen()) {
        to.openNode();
    } else {
        to.closeNode();
    }
}