File: c09.tex

package info (click to toggle)
cpdf 2.8.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,828 kB
  • sloc: ml: 34,724; makefile: 65; sh: 45
file content (150 lines) | stat: -rw-r--r-- 4,826 bytes parent folder | download
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// CHAPTER 8. Logos, Watermarks and Stamps
   
/** Stamps stamp_pdf on all the pages in the document which are in the
range. The stamp is placed with its origin at the origin of the target
document.
@arg {pdf} stamp_pdf stamp
@arg {pdf} pdf PDF document
@arg {range} range page range */
function stampOn(stamp_pdf, pdf, range) {}

/** Stamps stamp_pdf under all the pages in the document which are in the
range. The stamp is placed with its origin at the origin of the target
document.
@arg {pdf} stamp_pdf stamp
@arg {pdf} pdf PDF document
@arg {range} range page range */
function stampUnder(stamp_pdf, pdf, range) {}

/** A stamping function with extra features. 
@arg {pdf} pdf first PDF document
@arg {pdf} pdf second PDF document
@arg {boolean} isover pdf goes over pdf2, otherwise under
@arg {boolean} scale_stamp_to_fit scales the stamp to fit the page
@arg {anchor} anchor for position of stamp
@arg {number} p1 position argument 1
@arg {number} p2 position argument 2
@arg {boolean} relative_to_cropbox pos is relative to cropbox not mediabox. */
function stampExtended(pdf, pdf2, range, isover, scale_stamp_to_fit, position, relative_to_cropbox) {}

/** Combines the PDFs page-by-page, putting each page of 'over' over each page
of 'under'.
@arg {pdf} under PDF document
@arg {pdf} over PDF document
@result {pdf} resultant PDF document */
function combinePages(under, over) {}

/** Times Roman */
var timesRoman = 0;

/** Times Bold */
var timesBold = 1;

/** Times Italic */
var timesItalic = 2;

/** Times Bold Italic */
var timesBoldItalic = 3;

/** Helvetica */
var helvetica = 4;

/** Helvetica Bold */
var helveticaBold = 5;

/** Helvetica Oblique */
var helveticaOblique = 6;

/** Helvetica Bold Oblique */
var helveticaBoldOblique = 7;

/** Courier */
var courier = 8;

/** Courier Bold */
var courierBold = 9;

/** Courier Oblique */
var courierOblique = 10;

/** Courier Bold Oblique */
var courierBoldOblique = 11;

/** Left justify */
var leftJustify = 0;

/** Centre justify */
var centreJustify = 1;

/** Right justify */
var rightJustify = 2;

/** Adds text to the pages in the given range.
@arg {boolean} metrics collect metrics only
@arg {pdf} pdf PDF document
@arg {range} range page range
@arg {string} text text to add \\n for newline
@arg {anchor} anchor anchor to add text at
@arg {number} p1 position argument 1
@arg {number} p2 position argument 2
@arg {number} linespacing line spacing
@arg {number} bates starting bates number
@arg {font} font font
@arg {number} fontsize font size
@arg {number} r red component of colour 0..1
@arg {number} g green component of colour 0..1
@arg {number} b blue component of colour 0..1
@arg {boolean} underneath put text under the page rather than over
@arg {boolean} relative_to_cropbox position is relative to crop box not media box
@arg {boolean} outline text is outline
@arg {number} opacity opacity 0..1
@arg {justification} justification justification
@arg {boolean} midline position is relative to midline not baseline
@arg {boolean} topline position is relative to topline not baseline
@arg {string} filename file name
@arg {number} linewidth line width
@arg {boolean} embed_fonts add font information
*/
function addText(metrics, pdf, range, text, anchor, p1, p2, linespacing,
                 bates, font, fontsize, r, g, b, underneath, relative_to_cropbox, outline,
                 opacity, justification, midline, topline, filename, linewidth, embed_fonts) {}

/** Adds text with most parameters default.
@arg {pdf} pdf PDF document
@arg {range} range page range
@arg {string} text text to add. \\n for newline
@arg {anchor} anchor anchor to add text at
@arg {number} p1 position argument 1
@arg {number} p2 position argument 2
@arg {font} font font
@arg {number} fontsize font size */
function addTextSimple(pdf, range, text, anchor, p1, p2, font, fontsize) {}

/** Removes any text added by cpdf from the given pages.
@arg {pdf} pdf PDF document
@arg {range} range page range */
function removeText(pdf, range) {}

/** Returns the width of a given string in the given font in thousandths of a
point.
@arg {font} font font
@arg {string} text text
@result {number} width */
function textWidth(font, text) {}

/** Adds page content before (if true) or after (if false) the existing
content to pages in the given range in the given PDF.
@arg {string} content content to add
@arg {boolean} before rather than after
@arg {pdf} pdf PDF document
@arg {range} range page range */
function addContent(content, before, pdf, range) {}

/** Stamps stamp_pdf onto the pages in the given range in pdf as a shared Form
XObject. The name of the newly-created XObject is returned.
@arg {pdf} pdf PDF document
@arg {range} range page range
@arg {pdf} stamp_pdf stamp pdf
@result {string} name of XObject */
function stampAsXObject(pdf, range, stamp_pdf) {}