addOutline {harupdf} R Documentation

Append an outline or bookmark into PDF File


addOutline Append an outline or bookmark into PDF document.


addOutline(,, title);

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


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



#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)
addOutline("X", "C2", "Normal distribution");

#close device and output file;

[Package harupdf version 2.12.0 Index]