addOutline {harupdf} R Documentation

Append an outline or bookmark into PDF File

Description

addOutline Append an outline or bookmark into PDF document.

Usage

addOutline(root.id, cur.id, title);

Arguments

root.id a character string giving the root id of the PDF file
cur.id a character string giving the current id for current page.
title a title for current page.

Details

The ids supplied, i.e., root.id or cur.id are string within 256 characters. For top root id, the root.id is dot(".").

Examples

require(harupdf)

#Create a PDF file
harupdf(file="C:\temp\haru_test.pdf", paper="letter", width=7, height=9.5);

#Cover page(1st page)
plot(1:20, 1:20, type="n", xlim=c(0, 7*254), ylim=c(0, 9.5*254), xlab="", ylab="", lwd=2, xaxt="n", yaxt="n");

text(7*254/2, 1600, "Cover page", cex=2, adj=0.5);
addOutline(".", "X", "AddOutline Example");
addOutline("X", "C0", "Cover");

#Line data(2nd page)
plot(100:800, 100:800, type="l", xlim=c(0, 700), ylim=c(-100, +850), col="blue", lwd=0.25 );
addOutline("X", "C1", "Line plot");

#Normal distribution data(3rd page)
plot(rnorm(100))
addOutline("X", "C2", "Normal distribution");

#close device and output file
dev.off();

[Package harupdf version 2.12.0 Index]