-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpdfrects.1
92 lines (85 loc) · 2.07 KB
/
pdfrects.1
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
.TH pdfrects 1 "November 1, 2017"
.
.
.
.SH NAME
pdfrects - bounding box or text area of the pages of a pdf file
.
.
.
.SH SYNOPSYS
.PD 0
.TP 9
.B pdfrects
[\fB-f\fP \fIpage\fP] [\fB-l\fP \fIpage\fP]
[\fB-p\fP|\fB-t\fP] [\fB-b\fP] [\fB-e\fP \fIdirection\fP]
.IP
[\fB-d\fP \fIdistance\fP]
[\fB-n\fP [\fB-s\fP \fIn\fP] [\fB-i\fP]]
.IP
[\fB-a\fP] [\fB-r\fP \fIlevel\fP] [\fB-h\fP] \fIfile.pdf\fP
.PD
.SH DESCRIPTION
.B pdfrects
finds either the bounding box or the area of the text in the pages of a pdf
file. The first is the smallest rectangle encosing all text. The second is a
list of rectangles enclosing the text as tightly as possible while obeying a
minimal distance between them (15 by default).
These rectangles are drawn on the pages of the output \fIfile-boxes.pdf\fP in
random colors, and printed on stdout in YAML format.
.SH OPTIONS
.TP
\fB-f\fP \fIpage\fP
first page
.TP
\fB-f\fP \fIpage\fP
last page
.TP
.B -p
use the painted area instead of the textarea; it is obtained by dividing the
page into a grid of squares and checking which ones contain something
.TP
.B -t
use the rows instead of the textarea; they are obtained by joining
vertically-overlapping characters
.TP
.B -b
bounding box; the default is the textarea
.TP
.B -m
only the largest block of text in each page
.TP
.BI -e " direction
text extents in the given direction (\fIhorizontal\fP or \fIvertical\fP); this
is like the textarea, but boxes that overlap horizontally or vertically are
merged; the resulting set of rectangles tells how much horizontal or vertical
space text takes
.TP
\fB-d\fP \fIdistance\fP
the minimal distance between boxes in the textarea; a lower values implies a
larger number of rectangles
.TP
.B -n
number boxes in the pdf output
.TP
.B -i
print the box numbers inside the boxes, rather than on their side
.TP
\fB-s\fP \fIn\fP
sort boxes by method \fIn\fP: 0=quick, 1=twostep, 2=char
.TP
.B -a
test the box addition function: a 100x100 box is added to a location free of
text
.TP
\fB-r\fP \fIlevel\fP
test the textarea algorithm
.TP
.B -h
help
.
.
.
.SH SEE ALSO
\fBpdffit\fP(\fI1\fP),
\fBpdftoroff\fP(\fI1\fP)