1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
\documentclass[12pt]{article}
\usepackage{xcolor}
%\usepackage{xr-hyper}
\usepackage[bookmarksopen,bookmarksnumbered]{hyperref}
%\usepackage{eforms}
\usepackage{xbmks}
% the xr-hyper package may also be used if you have
% cross document links within the body of the doc
%\externaldocument[d1-]{doc1}
%\externaldocument[d2-]{doc2}
\title{On merging bookmarks for several documents}
\author{D. P. Story}
% The \xbmksetup command is placed in only
% one of the collection. It is written to xbmks.cfg
% in input by the other files to obtain uniformity
% of option choices.
\xbmksetup{%
docbundle={master,doc1,doc2},
colors={int=red,ext},
styles={intbf}
}
\begin{document}
\maketitle
\tableofcontents
% color and style specified. This will be how these entries are displayed across
% all documents in the bundle
\pdfbookmarkx[1]{http://blog.acrotex.net}[action={/S/URI/URI(http://blog.acrotex.net)},%
color=magenta,style={bf}]{blog}
\currentpdfbookmarkx{http://www.acrotex.net}[action={/S/URI/URI(http://www.acrotex.net)},%
color=magenta,style={bf}]{home}
\currentpdfbookmarkx{First page}[action={/S/Named/N/FirstPage},%
color=magenta,style={bf}]{First}
\currentpdfbookmarkx{Last page}[action={/S/Named/N/LastPage},%
color=magenta,style={bf}]{Last}
% the eforms versions of the above
%\pdfbookmarkx[1]{http://blog.acrotex.net}[action={\URI{http://blog.acrotex.net}},%
% color=magenta,style={bf}]{blog}
%\currentpdfbookmarkx{http://www.acrotex.net}[action={\URI{http://www.acrotex.net}},%
% color=magenta,style={bf}]{home}
%\currentpdfbookmarkx{First page}[action={\Named{FirstPage}},%
% color=magenta,style={bf}]{First}
%\currentpdfbookmarkx{Last page}[action={\Named{LastPage}},%
% color=magenta,style={bf}]{Last}
\section{Master One}
Some content goes here.
% color and style not specified, this bookmark will take on the default
% color and style as declared in the \xbmksetup command.
\belowpdfbookmarkx{JavaScript Action}[%
action={/S/JavaScript/JS(app.alert("Hello World!\\n\\nAnnounced from the document "
+ this.documentFileName);)}]{jsa}
% eforms version
%\belowpdfbookmarkx{JavaScript Action}[
% action={\JS{app.alert("Hello World!\\n\\nAnnounced from the document "
% + this.documentFileName);}]{jsa}
% color and style not specified, this bookmark will take on the default
% color and style as declared in the \xbmksetup command.
\belowpdfbookmarkx{Go to doc1, page 2}[action={/S/GoToR/F(doc1.pdf)/D[1 /Fit]}]{gotor1}
% eforms version
%\belowpdfbookmarkx{Go to doc1, page 2}[action={\GoToR/F(doc1.pdf)/D[1 /Fit]}]{gotor}
\hypersetup{bookmarksopen=false}
% This next bookmark is a title only, the actions is to jump to an destination not defined
\subpdfbookmarkx{Sub: Optional Bookmarks}[action={/S/GoTo/D(undefined)}]{optBmks}
\belowpdfbookmarkx{doc1, page 3}[action={/S/GoToR/F(doc1.pdf)/D[2 /Fit]}]{gotor2}
\belowpdfbookmarkx{doc2, page 2}[action={/S/GoToR/F(doc2.pdf)/D[1 /Fit]}]{gotor3}
\hypersetup{bookmarksopen=true}
\subsection{Master One: subSec 1}
Some content goes here.
\newpage
\section{Master Two}
Some content goes here.
\subsection{Master Two: subSec 1}
Some content goes here.
\newpage
\subsection{Master Two: subSec 2}
Some content goes here.
\end{document}
|