jspdf-dynamo 1.0.1 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/index.cjs +90 -30
  2. package/dist/index.d.cts +18 -6
  3. package/dist/index.d.ts +18 -6
  4. package/dist/index.js +90 -30
  5. package/documentation/3. Variables/Introduction.txt +15 -12
  6. package/documentation/3. Variables/SystemMaintained.txt +47 -63
  7. package/documentation/4. Commands/AddBookmark.txt +4 -4
  8. package/documentation/4. Commands/AddPage.txt +6 -4
  9. package/documentation/4. Commands/CheckPage.txt +3 -3
  10. package/documentation/4. Commands/Commands.txt +7 -0
  11. package/documentation/4. Commands/CopyVar.txt +3 -3
  12. package/documentation/4. Commands/DivVar.txt +67 -0
  13. package/documentation/4. Commands/Do.txt +3 -3
  14. package/documentation/4. Commands/DoRepeat.txt +3 -3
  15. package/documentation/4. Commands/DrawBox.txt +3 -3
  16. package/documentation/4. Commands/DrawDebugGrid.txt +3 -3
  17. package/documentation/4. Commands/DrawImage.txt +4 -4
  18. package/documentation/4. Commands/DrawLine.txt +3 -3
  19. package/documentation/4. Commands/DrawTextBox.txt +1 -1
  20. package/documentation/4. Commands/DrawTextWrapped.txt +40 -17
  21. package/documentation/4. Commands/ForEachPage.txt +4 -4
  22. package/documentation/4. Commands/GetEnvVar.txt +2 -2
  23. package/documentation/4. Commands/IfEq.txt +53 -0
  24. package/documentation/4. Commands/IfGt.txt +1 -1
  25. package/documentation/4. Commands/IfNotBlank.txt +3 -3
  26. package/documentation/4. Commands/IncCurrentX.txt +1 -1
  27. package/documentation/4. Commands/IncCurrentY.txt +1 -1
  28. package/documentation/4. Commands/IncVar.txt +8 -8
  29. package/documentation/4. Commands/Include.txt +8 -8
  30. package/documentation/4. Commands/IncludeUrl.txt +43 -1
  31. package/documentation/4. Commands/{AddImageFromFile.txt → LoadImageFromFile.txt } +6 -6
  32. package/documentation/4. Commands/{AddImageFromUrl.txt → LoadImageFromUrl.txt } +6 -6
  33. package/documentation/4. Commands/MultVar.txt +11 -14
  34. package/documentation/4. Commands/SavePdf.txt +6 -0
  35. package/documentation/4. Commands/SelectPage.txt +6 -0
  36. package/documentation/4. Commands/SetCurrentX.txt +5 -5
  37. package/documentation/4. Commands/SetCurrentY.txt +3 -3
  38. package/documentation/4. Commands/SetDocumentInfo.txt +3 -3
  39. package/documentation/4. Commands/SetFillColour.txt +8 -25
  40. package/documentation/4. Commands/SetFontName.txt +3 -1
  41. package/documentation/4. Commands/SetFontSize.txt +2 -0
  42. package/documentation/4. Commands/SetLineColour.txt +8 -26
  43. package/documentation/4. Commands/SetLineWidth.txt +7 -7
  44. package/documentation/4. Commands/SetLogLevel.txt +6 -0
  45. package/documentation/4. Commands/SetMargin.txt +11 -14
  46. package/documentation/4. Commands/SetTextColour.txt +43 -0
  47. package/documentation/4. Commands/SetVar.txt +9 -10
  48. package/documentation/4. Commands/WriteLog.txt +56 -0
  49. package/documentation/Documentation.pdf +3430 -2703
  50. package/documentation/documentation.txt +13 -12
  51. package/package.json +2 -2
  52. package/documentation/4. Commands/SetPageOrientation.txt +0 -42
@@ -3,44 +3,44 @@
3
3
 
4
4
  .incCurrentY %halfLineGap%
5
5
  .SetVar text JsPdfDynamo maintains and updates various variables as each command is processed. These
6
- .SetVar text %text% variables can not be changed directly by using the SetVar command. They include:
7
- .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %LongText%
6
+ .SetVar text %text% variables can not be changed directly by using the SetVar command.
7
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
8
+ .incCurrentY %halfLineGap%
9
+ .SetVar text Note that unless otherwise stated, all distances and positions are in the unit of measure specified
10
+ .SetVar text %text% when creating the JsPdfDynamo object.
11
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
8
12
  .incCurrentY %halfLineGap%
9
13
  .SetMargin L 20
10
14
 
11
15
  .SetVar CommandLine1 _CurrentX
12
- .SetVar CommandLine2 The current horizontal position on the page, relative to the left margin, in
13
- .Do VariableLine
14
- .SetVar CommandLine2 millimeters.
16
+ .SetVar CommandLine2 The current horizontal position on the page, relative to the left margin.
15
17
  .Do VariableLine
16
18
 
17
19
  .incCurrentY %halfLineGap%
18
20
  .SetVar CommandLine1 _CurrentY
19
- .SetVar CommandLine2 The current vertical position on the page, relative to the top margin, in
20
- .Do VariableLine
21
- .SetVar CommandLine2 millimeters.
21
+ .SetVar CommandLine2 The current vertical position on the page, relative to the top margin.
22
22
  .Do VariableLine
23
23
 
24
24
  .incCurrentY %halfLineGap%
25
25
  .SetVar CommandLine1 _CurrentPageSize
26
- .SetVar CommandLine2 The name of the last page size specified, for example, 'A4', 'Letter'.
26
+ .SetVar CommandLine2 The name of the last page size specified, for example, 'a4', 'letter'.
27
27
  .Do VariableLineWide
28
28
 
29
29
  .incCurrentY %halfLineGap%
30
30
  .SetVar CommandLine1 _CurrentPageOrientation
31
- .SetVar CommandLine2 The last page orientation specified:
32
- .Do VariableLineWide
33
- .SetVar CommandLine2 0=Portrait (default) 1=Landscape
31
+ .SetVar CommandLine2 The last page orientation specified: 'portrait' or 'landscape'
34
32
  .Do VariableLineWide
35
33
 
36
34
  .incCurrentY %halfLineGap%
37
35
  .SetVar CommandLine1 _FontHeight
38
- .SetVar CommandLine2 The height of the current font, in millimeters. This can be used to create
39
- .Do VariableLine
40
- .SetVar CommandLine2 a space between paragraphs when used in conjunction with the
41
- .Do VariableLine
42
- .SetVar CommandLine2 incCurrentY command: .incCurrentY %%%%_FontHeight%%%%
43
- .Do VariableLine
36
+ .SetVar CommandLine2 The height of the current font. This can be used to create a space between
37
+ .SetVar CommandLine2 %CommandLine2% paragraphs when used in conjunction with the incCurrentY command.
38
+ .Do VariableLineWrapped
39
+
40
+ .incCurrentY %halfLineGap%
41
+ .SetVar CommandLine1 _FontName
42
+ .SetVar CommandLine2 The name of the current font. For example, "helvetica", which is the default font.
43
+ .Do VariableLineWrapped
44
44
 
45
45
  .incCurrentY %halfLineGap%
46
46
  .SetVar CommandLine1 _FontPointSize
@@ -53,15 +53,13 @@
53
53
  .Do VariableLine
54
54
 
55
55
  .incCurrentY %halfLineGap%
56
- .SetVar CommandLine1 _FontType
57
- .SetVar CommandLine2 The name of the current font. For example, "Helvetica", which is the
58
- .Do VariableLine
59
- .SetVar CommandLine2 default font type.
60
- .Do VariableLine
56
+ .SetVar CommandLine1 _ImageAspect
57
+ .SetVar CommandLine2 The aspect ratio of the last loaded image, calculated as width divided by height.
58
+ .Do VariableLineWrapped
61
59
 
62
60
  .incCurrentY %halfLineGap%
63
61
  .SetVar CommandLine1 _ImageHeight
64
- .SetVar CommandLine2 The height of the last loaded image in the current units of measure.
62
+ .SetVar CommandLine2 The height of the last loaded image.
65
63
  .Do VariableLine
66
64
 
67
65
  .incCurrentY %halfLineGap%
@@ -71,7 +69,7 @@
71
69
 
72
70
  .incCurrentY %halfLineGap%
73
71
  .SetVar CommandLine1 _ImageWidth
74
- .SetVar CommandLine2 The width of the last loaded image in the current units of measure.
72
+ .SetVar CommandLine2 The width of the last loaded image.
75
73
  .Do VariableLine
76
74
 
77
75
  .incCurrentY %halfLineGap%
@@ -81,7 +79,7 @@
81
79
 
82
80
  .incCurrentY %halfLineGap%
83
81
  .SetVar CommandLine1 _LastError
84
- .SetVar CommandLine2 A description of the last error encountered.
82
+ .SetVar CommandLine2 A description of the last error encountered.
85
83
  .Do VariableLine
86
84
 
87
85
  .incCurrentY %halfLineGap%
@@ -95,50 +93,46 @@
95
93
 
96
94
  .incCurrentY %halfLineGap%
97
95
  .SetVar CommandLine1 _LastObjectHeight
98
- .SetVar CommandLine2 The height of the last object that has been output, in millimeters.
96
+ .SetVar CommandLine2 The height of the last object that has been drawn.
99
97
  .Do VariableLine
100
98
 
101
99
  .incCurrentY %halfLineGap%
102
100
  .SetVar CommandLine1 _LastObjectWidth
103
- .SetVar CommandLine2 The width of the last object that has been output, in millimeters.
101
+ .SetVar CommandLine2 The width of the last object that has been drawn.
104
102
  .Do VariableLine
105
103
 
106
104
  .incCurrentY %halfLineGap%
107
105
  .SetVar CommandLine1 _LastOutline
108
106
  .SetVar CommandLine2 This contains the number assigned to each outline entry when it is
109
- .Do VariableLine
110
- .SetVar CommandLine2 created. This number is used when creating child outline entries.
111
- .Do VariableLine
107
+ .SetVar CommandLine2 %CommandLine2% created. This is used when creating child outline entries.
108
+ .Do VariableLineWrapped
112
109
 
113
110
  .incCurrentY %halfLineGap%
114
111
  .SetVar CommandLine1 _LastResult
115
112
  .SetVar CommandLine2 Most commands update this variable. If the command fails, this will be
116
- .Do VariableLine
117
- .SetVar CommandLine2 set to '0'. A successful command wil set this to '1' or to some other
118
- .Do VariableLine
119
- .SetVar CommandLine2 useful value. For example, when a new page is created the page number
120
- .Do VariableLine
121
- .SetVar CommandLine2 is returned in this variable.
122
- .Do VariableLine
113
+ .SetVar CommandLine2 %CommandLine2% set to '0'. A successful command will set this to '1' or to some other
114
+ .SetVar CommandLine2 %CommandLine2% useful value. For example, when a new page is added, _LastResult
115
+ .SetVar CommandLine2 %CommandLine2% will contain the number of the added page.
116
+ .Do VariableLineWrapped
123
117
 
124
118
  .incCurrentY %halfLineGap%
125
119
  .SetVar CommandLine1 _MarginBottom
126
- .SetVar CommandLine2 The current margin, in millimeters, from the page bottom edge.
120
+ .SetVar CommandLine2 The current margin from the bottom edge of the page.
127
121
  .Do VariableLine
128
122
 
129
123
  .incCurrentY %halfLineGap%
130
124
  .SetVar CommandLine1 _MarginLeft
131
- .SetVar CommandLine2 The current margin, in millimeters, from the page left edge.
125
+ .SetVar CommandLine2 The current margin from the left edge of the page.
132
126
  .Do VariableLine
133
127
 
134
128
  .incCurrentY %halfLineGap%
135
129
  .SetVar CommandLine1 _MarginRight
136
- .SetVar CommandLine2 The current margin, in millimeters, from the page right edge.
130
+ .SetVar CommandLine2 The current margin from the right edge of the page.
137
131
  .Do VariableLine
138
132
 
139
133
  .incCurrentY %halfLineGap%
140
134
  .SetVar CommandLine1 _MarginTop
141
- .SetVar CommandLine2 The current margin, in millimeters, from the page top edge.
135
+ .SetVar CommandLine2 The current margin from the top edge of the page.
142
136
  .Do VariableLine
143
137
 
144
138
  .incCurrentY %halfLineGap%
@@ -148,9 +142,7 @@
148
142
 
149
143
  .incCurrentY %halfLineGap%
150
144
  .SetVar CommandLine1 _PageHeight
151
- .SetVar CommandLine2 The height of the page, less the current top and bottom margins,
152
- .Do VariableLine
153
- .SetVar CommandLine2 expressed in millimeters.
145
+ .SetVar CommandLine2 The height of the page, less the current top and bottom margins.
154
146
  .Do VariableLine
155
147
 
156
148
  .incCurrentY %halfLineGap%
@@ -160,31 +152,23 @@
160
152
 
161
153
  .incCurrentY %halfLineGap%
162
154
  .SetVar CommandLine1 _PageWidth
163
- .SetVar CommandLine2 The width of the page, less the current left and right margins, expressed
164
- .Do VariableLine
165
- .SetVar CommandLine2 in millimeters.
155
+ .SetVar CommandLine2 The width of the page, less the current left and right margins.
166
156
  .Do VariableLine
167
157
 
168
158
  .incCurrentY %halfLineGap%
169
159
  .SetVar CommandLine1 _SpaceHoz
170
160
  .SetVar CommandLine2 JsPdfDynamo keeps track of the current position, relative to the left
171
- .Do VariableLine
172
- .SetVar CommandLine2 margin, after each object is output. This position is calculated in
173
- .Do VariableLine
174
- .SetVar CommandLine2 millimeters from the width of the object plus the current horizontal spacing,
175
- .Do VariableLine
176
- .SetVar CommandLine2 which can be set with the SetSpaceHoz command.
177
- .Do VariableLine
161
+ .SetVar CommandLine2 %CommandLine2% margin, after each object is output. This position is calculated
162
+ .SetVar CommandLine2 %CommandLine2% from the width of the object plus the current horizontal spacing,
163
+ .SetVar CommandLine2 %CommandLine2% which can be set with the SetSpaceHoz command.
164
+ .Do VariableLineWrapped
178
165
 
179
166
  .incCurrentY %halfLineGap%
180
167
  .SetVar CommandLine1 _SpaceVert
181
- .SetVar CommandLine2 JsPdfDynamo keeps track of the current position, in millimeters, relative
182
- .Do VariableLine
183
- .SetVar CommandLine2 to the top margin, after each object is output. This position is calculated
184
- .Do VariableLine
185
- .SetVar CommandLine2 from the height of the object plus the current vertical spacing, which can
186
- .Do VariableLine
187
- .SetVar CommandLine2 be set with the SetSpaceVert command.
188
- .Do VariableLine
168
+ .SetVar CommandLine2 %CommandLine2% JsPdfDynamo keeps track of the current position, relative
169
+ .SetVar CommandLine2 %CommandLine2% to the top margin, after each object is output. This position is calculated
170
+ .SetVar CommandLine2 %CommandLine2% from the height of the object plus the current vertical spacing, which can
171
+ .SetVar CommandLine2 %CommandLine2% be set with the SetSpaceVert command.
172
+ .Do VariableLineWrapped
189
173
  .incCurrentY %_SPACEVERT%
190
174
  .Do SetMargins
@@ -6,7 +6,7 @@
6
6
 
7
7
  .SetVar CommandSubHeading Syntax
8
8
  .Do CommandSubHeading
9
- .SetVar CommandLine1 .AddBookmark ParentId PageNo Text
9
+ .SetVar CommandLine1 .AddBookmark ParentId PageNo Text
10
10
  .Do CommandLine2
11
11
 
12
12
  .SetVar CommandSubHeading Parameters
@@ -34,14 +34,14 @@
34
34
  .SetVar CommandLine1 Create a top level bookmark entry for the current page:
35
35
  .Do CommandLine
36
36
  .incCurrentY %halfLineGap%
37
- .SetVar CommandLine1 .AddBookmark 0 %%%%_PAGENO%%%% Chapter one of the document
37
+ .SetVar CommandLine1 .AddBookmark 0 %%%%_PAGENO%%%% Chapter one of the document
38
38
  .Do CommandLine2
39
- .SetVar CommandLine1 .SetVar Chapter1 %%%%_LastResult%%%%
39
+ .SetVar CommandLine1 .SetVar Chapter1 %%%%_LastResult%%%%
40
40
  .Do CommandLine2
41
41
  .incCurrentY %_FontHeight%
42
42
  .SetVar CommandLine1 Create a child bookmark entry for the chapter 1:
43
43
  .Do CommandLine
44
44
  .incCurrentY %halfLineGap%
45
- .SetVar CommandLine1 .AddBookmark %%%%Chapter1%%%% %%%%_PAGENO%%%% Chapter one, Paragraph 1
45
+ .SetVar CommandLine1 .AddBookmark %%%%Chapter1%%%% %%%%_PAGENO%%%% Chapter one, Paragraph 1
46
46
  .Do CommandLine2
47
47
  .incCurrentY %_FontHeight%
@@ -4,15 +4,17 @@
4
4
 
5
5
  .SetVar CommandSubHeading Syntax
6
6
  .Do CommandSubHeading
7
- .SetVar CommandLine1 .AddPage {PageSize}
7
+ .SetVar CommandLine1 .AddPage PageSize Orientation
8
8
  .Do CommandLine2
9
9
 
10
10
  .SetVar CommandSubHeading Parameters
11
11
  .Do CommandSubHeading
12
12
  .SetVar CommandLine1 PageSize
13
- .SetVar CommandLine2 The page size: A3, A4, Letter, etc. Optional and if not supplied the
13
+ .SetVar CommandLine2 The size of the page to be added: A3, A4, Letter, etc. Optional and if not supplied, the current page size is used.
14
14
  .Do CommandLine2
15
- .SetVar CommandLine2 current page size is used
15
+ .SetVar CommandLine1 Orientation
16
+ .SetVar CommandLine2 The orientation of the page to be added: 'portrait' or 'landscape'. Optional and if not supplied, the
17
+ .SetVar CommandLine2 %CommandLine2% current orientation is used. The orientation can be abbreviated to the first letter, 'p' or 'l'.
16
18
  .Do CommandLine2
17
19
 
18
20
  .SetVar CommandSubHeading Other
@@ -35,6 +37,6 @@
35
37
  .SetVar CommandLine1 Create a new page with a page size of 'A4':
36
38
  .Do CommandLine
37
39
  .incCurrentY %halfLineGap%
38
- .SetVar CommandLine1 .AddPage A4
40
+ .SetVar CommandLine1 .AddPage a4
39
41
  .Do CommandLine2
40
42
  .incCurrentY %_FontHeight%
@@ -12,7 +12,7 @@
12
12
 
13
13
  .SetVar CommandSubHeading Syntax
14
14
  .Do CommandSubHeading
15
- .SetVar CommandLine1 .CheckPage Distance {Group1, Group2 ...}
15
+ .SetVar CommandLine1 .CheckPage Distance {Group1, Group2 ...}
16
16
  .Do CommandLine2
17
17
 
18
18
  .SetVar CommandSubHeading Parameters
@@ -38,7 +38,7 @@
38
38
  .SetVar CommandLine1 %CommandLine1% is within 10mm of the bottom margin and create a new page if so:
39
39
  .Do CommandLine
40
40
  .incCurrentY %halfLineGap%
41
- .SetVar CommandLine1 .CheckPage 10
41
+ .SetVar CommandLine1 .CheckPage 10
42
42
  .Do CommandLine2
43
43
  .incCurrentY %_FontHeight%
44
44
 
@@ -47,6 +47,6 @@
47
47
  .SetVar CommandLine1 %CommandLine1% process the groups PageFooter, AddPage and GroupHeadingContinued:
48
48
  .Do CommandLine
49
49
  .incCurrentY %halfLineGap%
50
- .SetVar CommandLine1 .CHECKPAGE 1.25 PageFooter AddPage GroupHeadingContinued
50
+ .SetVar CommandLine1 .CHECKPAGE 1.25 PageFooter AddPage GroupHeadingContinued
51
51
  .Do CommandLine2
52
52
  .incCurrentY %_FontHeight%
@@ -0,0 +1,7 @@
1
+ .SetVar ChapterName Commands
2
+ .do ChapterHeading
3
+
4
+ .SetVar text Note that unless otherwise stated, all distances and positions are in the unit of measure specified
5
+ .SetVar text %text% when creating the JsPdfDynamo object.
6
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
7
+ .incCurrentY %_FontHeight%
@@ -6,7 +6,7 @@
6
6
 
7
7
  .SetVar CommandSubHeading Syntax
8
8
  .Do CommandSubHeading
9
- .SetVar CommandLine1 .CopyVar CopyTo CopyFrom
9
+ .SetVar CommandLine1 .CopyVar CopyTo CopyFrom
10
10
  .Do CommandLine2
11
11
 
12
12
  .SetVar CommandSubHeading Parameters
@@ -33,7 +33,7 @@
33
33
  .SetVar CommandLine1 Set the variable 'SaveCurrentTop' to the system maintained variable '_CurrentY':
34
34
  .Do CommandLine
35
35
  .incCurrentY %halfLineGap%
36
- .SetVar CommandLine1 .CopyVar SaveCurrentTop _CurrentY
36
+ .SetVar CommandLine1 .CopyVar SaveCurrentTop _CurrentY
37
37
  .Do CommandLine2
38
38
  .incCurrentY %_FontHeight%
39
39
 
@@ -47,6 +47,6 @@
47
47
 
48
48
  .SetVar CommandSubHeading See Also
49
49
  .Do CommandSubHeading
50
- .SetVar CommandLine1 IncVar, MultVar, SetVar
50
+ .SetVar CommandLine1 DivVar, IncVar, MultVar, SetVar
51
51
  .Do CommandLine2
52
52
  .incCurrentY %_FontHeight%
@@ -0,0 +1,67 @@
1
+ .SetVar CommandName DivVar
2
+ .Do CommandHeading
3
+ .DrawText 0 %_CurrentY% Divide the value of a variable by one or more factors.
4
+
5
+ .SetVar CommandSubHeading Syntax
6
+ .Do CommandSubHeading
7
+ .SetVar CommandLine1 .DivVar Variable Value Value (etc)
8
+ .Do CommandLine2
9
+
10
+ .SetVar CommandSubHeading Parameters
11
+ .Do CommandSubHeading
12
+ .SetVar CommandLine1 Variable
13
+ .SetVar CommandLine2 The name of the variable to update. This is not usually a substitution variable,
14
+ .SetVar CommandLine2 %CommandLine2% but it can be, or contain substitution variables. The variable must exist.
15
+ .Do CommandLine2
16
+ .SetVar CommandLine1 Value
17
+ .SetVar CommandLine2 One or more values to multiple the variable by. These can be constants or substitution variables.
18
+ .Do CommandLine2
19
+
20
+ .SetVar CommandSubHeading Other
21
+ .Do CommandSubHeading
22
+ .SetVar CommandLine1 Variable _LastResult is set to '1' if a valid variable name is provided, otherwise it is set to '0'.
23
+ .Do CommandLine
24
+ .SetVar CommandLine1 The JsPdfDynamo maintained variables (those whose name starts with an underscore) can not
25
+ .Do CommandLine
26
+ .SetVar CommandLine1 be changed by this command.
27
+ .Do CommandLine
28
+ .incCurrentY %halfLineGap%
29
+ .SetVar CommandLine1 The variable name may itself be, or contain a variable.
30
+ .Do CommandLine
31
+
32
+ .SetVar CommandSubHeading Examples
33
+ .Do CommandSubHeading
34
+ .SetVar CommandLine1 Divide the value of the variable 'Total' by '4':
35
+ .Do CommandLine
36
+ .incCurrentY %halfLineGap%
37
+ .SetVar CommandLine1 .SetVar Total 12
38
+ .Do CommandLine2
39
+ .SetVar CommandLine1 .DivVar Total 4
40
+ .Do CommandLine2
41
+ .incCurrentY %_FontHeight%
42
+
43
+ .SetVar CommandLine1 Decrease the value of 'Weight6' by half from '78.6' to '39.3':
44
+ .Do CommandLine
45
+ .incCurrentY %halfLineGap%
46
+ .SetVar CommandLine1 .SetVar index 6
47
+ .Do CommandLine2
48
+ .SetVar CommandLine1 .SetVar Weight%%%%index%%%% 78.6
49
+ .Do CommandLine2
50
+ .SetVar CommandLine1 .DivVar Weight%%%%index%%%% 2
51
+ .Do CommandLine2
52
+ .incCurrentY %_FontHeight%
53
+
54
+ .SetVar CommandLine1 Multiple values can be used to increase value of 'total' from 100 to 5
55
+ .Do CommandLine
56
+ .incCurrentY %halfLineGap%
57
+ .SetVar CommandLine1 .SetVar Total 10
58
+ .Do CommandLine2
59
+ .SetVar CommandLine1 .DivVar Total 10 2
60
+ .Do CommandLine2
61
+ .incCurrentY %_FontHeight%
62
+
63
+ .SetVar CommandSubHeading See Also
64
+ .Do CommandSubHeading
65
+ .SetVar CommandLine1 CopyVar, IncVar, MultVar, SetVar
66
+ .Do CommandLine2
67
+ .incCurrentY %_FontHeight%
@@ -3,7 +3,7 @@
3
3
  .DrawText 0 %_CurrentY% 'Do' (ie process) one or more groups of commands that have already been defined.
4
4
  .SetVar CommandSubHeading Syntax
5
5
  .Do CommandSubHeading
6
- .SetVar CommandLine1 .Do Group1, Group2...etc
6
+ .SetVar CommandLine1 .Do Group1, Group2...etc
7
7
  .Do CommandLine2
8
8
 
9
9
  .SetVar CommandSubHeading Parameters
@@ -23,13 +23,13 @@
23
23
  .SetVar CommandLine1 Process the groups 'NewChapter' and 'NewSection':
24
24
  .Do CommandLine
25
25
  .incCurrentY %halfLineGap%
26
- .SetVar CommandLine1 .Do NewChapter NewSection
26
+ .SetVar CommandLine1 .Do NewChapter NewSection
27
27
  .Do CommandLine2
28
28
  .incCurrentY %_FontHeight%
29
29
  .SetVar CommandLine1 Process the group whose name is stored in the variable 'NextGroup':
30
30
  .Do CommandLine
31
31
  .incCurrentY %halfLineGap%
32
- .SetVar CommandLine1 .Do %%%%NextGroup%%%%
32
+ .SetVar CommandLine1 .Do %%%%NextGroup%%%%
33
33
  .Do CommandLine2
34
34
  .incCurrentY %_FontHeight%
35
35
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  .SetVar CommandSubHeading Syntax
8
8
  .Do CommandSubHeading
9
- .SetVar CommandLine1 .DoRepeat Number Group1, Group2...etc
9
+ .SetVar CommandLine1 .DoRepeat Number Group1, Group2...etc
10
10
  .Do CommandLine2
11
11
 
12
12
  .SetVar CommandSubHeading Parameters
@@ -34,13 +34,13 @@
34
34
  .SetVar CommandLine1 %CommandLine1% 'Detail', 'Footer', 'Heading', 'Detail', 'Footer', 'Heading', 'Detail, 'Footer'):
35
35
  .Do CommandLine
36
36
  .incCurrentY %halfLineGap%
37
- .SetVar CommandLine1 .DoRepeat 3 Heading Detail Footer
37
+ .SetVar CommandLine1 .DoRepeat 3 Heading Detail Footer
38
38
  .Do CommandLine2
39
39
  .incCurrentY %_FontHeight%
40
40
  .SetVar CommandLine1 Process the group PrintAddress the number of times stored in the variable 'AddressCount':
41
41
  .Do CommandLine
42
42
  .incCurrentY %halfLineGap%
43
- .SetVar CommandLine1 .DoRepeat %%%%AddressCount%%%% PrintAddress
43
+ .SetVar CommandLine1 .DoRepeat %%%%AddressCount%%%% PrintAddress
44
44
  .Do CommandLine2
45
45
  .incCurrentY %_FontHeight%
46
46
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  .SetVar CommandSubHeading Syntax
6
6
  .Do CommandSubHeading
7
- .SetVar CommandLine1 .DrawBox Left Top Width Height Option
7
+ .SetVar CommandLine1 .DrawBox Left Top Width Height Option
8
8
  .Do CommandLine2
9
9
 
10
10
  .SetVar CommandSubHeading Parameters
@@ -48,7 +48,7 @@
48
48
  .SetVar CommandLine1 %CommandLine1% spans the width of the page and is 14.5 millimeters high.
49
49
  .Do CommandLine
50
50
  .incCurrentY %halfLineGap%
51
- .SetVar CommandLine1 .DrawBox 0 %%%%_CurrentY%%%% %%%%_PageWidth%%%% 14.5 0
51
+ .SetVar CommandLine1 .DrawBox 0 %%%%_CurrentY%%%% %%%%_PageWidth%%%% 14.5 0
52
52
  .Do CommandLine2
53
53
 
54
54
  .incCurrentY %_FontHeight%
@@ -57,7 +57,7 @@
57
57
  .SetVar CommandLine1 %CommandLine1% of the page and is ½ inch high.
58
58
  .Do CommandLine
59
59
  .incCurrentY %halfLineGap%
60
- .SetVar CommandLine1 .DrawBox 0 0 %%%%_PageWidth%%%% 0.5 2
60
+ .SetVar CommandLine1 .DrawBox 0 0 %%%%_PageWidth%%%% 0.5 2
61
61
  .Do CommandLine2
62
62
 
63
63
  .SetVar CommandSubHeading See Also
@@ -7,7 +7,7 @@
7
7
 
8
8
  .SetVar CommandSubHeading Syntax
9
9
  .Do CommandSubHeading
10
- .SetVar CommandLine1 .DrawDebugGrid Option
10
+ .SetVar CommandLine1 .DrawDebugGrid Option
11
11
  .Do CommandLine2
12
12
 
13
13
  .SetVar CommandSubHeading Parameters
@@ -24,14 +24,14 @@
24
24
  .SetVar CommandLine1 %CommandLine1% down to the bottom right.
25
25
  .Do CommandLine
26
26
  .incCurrentY %halfLineGap%
27
- .SetVar CommandLine1 .DrawDebugGrid Page
27
+ .SetVar CommandLine1 .DrawDebugGrid Page
28
28
  .Do CommandLine2
29
29
  .incCurrentY %_FontHeight%
30
30
 
31
31
  .SetVar CommandLine1 Draws a debug grid on all pages of the document, within the current margin settings.
32
32
  .Do CommandLine
33
33
  .incCurrentY %halfLineGap%
34
- .SetVar CommandLine1 .ForEachPage .DrawDebugGrid
34
+ .SetVar CommandLine1 .ForEachPage .DrawDebugGrid
35
35
  .Do CommandLine2
36
36
 
37
37
  .SetVar CommandSubHeading See Also
@@ -5,7 +5,7 @@
5
5
 
6
6
  .SetVar CommandSubHeading Syntax
7
7
  .Do CommandSubHeading
8
- .SetVar CommandLine1 .DrawImage ImageNo Left Top Width Height Scale
8
+ .SetVar CommandLine1 .DrawImage ImageNo Left Top Width Height Scale
9
9
  .Do CommandLine2
10
10
 
11
11
  .SetVar CommandSubHeading Parameters
@@ -73,7 +73,7 @@
73
73
  .SetVar CommandLine1 %CommandLine1% location on the page.
74
74
  .Do CommandLine
75
75
  .incCurrentY %halfLineGap%
76
- .SetVar CommandLine1 .DrawImage %%%%ImageId%%%% %%%%_CurrentX%%%% %%%%_CurrentY%%%%
76
+ .SetVar CommandLine1 .DrawImage %%%%ImageId%%%% %%%%_CurrentX%%%% %%%%_CurrentY%%%%
77
77
  .Do CommandLine2
78
78
  .incCurrentY %_FontHeight%
79
79
  .SetVar CommandLine1 Assuming that the unit of measure is millimeters,
@@ -81,12 +81,12 @@
81
81
  .SetVar CommandLine1 %CommandLine1% the page and scaled proportionally to be 10mm high.
82
82
  .Do CommandLine
83
83
  .incCurrentY %halfLineGap%
84
- .SetVar CommandLine1 .DrawImage %%%%LogoId%%%% 0 0 0 10
84
+ .SetVar CommandLine1 .DrawImage %%%%LogoId%%%% 0 0 0 10
85
85
  .Do CommandLine2
86
86
  .incCurrentY %_FontHeight%
87
87
 
88
88
  .SetVar CommandSubHeading See Also
89
89
  .Do CommandSubHeading
90
- .SetVar CommandLine1 AddImageFromFile, AddImageFromUrl
90
+ .SetVar CommandLine1 LoadImageFromFile, LoadImageFromUrl
91
91
  .Do CommandLine2
92
92
  .incCurrentY %_FontHeight%
@@ -7,7 +7,7 @@
7
7
 
8
8
  .SetVar CommandSubHeading Syntax
9
9
  .Do CommandSubHeading
10
- .SetVar CommandLine1 .DrawLine Left Top Right Bottom
10
+ .SetVar CommandLine1 .DrawLine Left Top Right Bottom
11
11
  .Do CommandLine2
12
12
 
13
13
  .SetVar CommandSubHeading Parameters
@@ -45,14 +45,14 @@
45
45
  .SetVar CommandLine1 %CommandLine1% output a vertical line 15cm from the left margin:
46
46
  .Do CommandLine
47
47
  .incCurrentY %halfLineGap%
48
- .SetVar CommandLine1 .DrawLine 150 0 150 %%%%_PageHeight%%%%
48
+ .SetVar CommandLine1 .DrawLine 150 0 150 %%%%_PageHeight%%%%
49
49
  .Do CommandLine2
50
50
 
51
51
  .incCurrentY %_FontHeight%
52
52
  .SetVar CommandLine1 Output a horizontal line at the current vertical position on the page:
53
53
  .Do CommandLine
54
54
  .incCurrentY %halfLineGap%
55
- .SetVar CommandLine1 .DrawLine 0 %%%%_CurrentY%%%% %%%%_PageWidth%%%% %%%%_CurrentY%%%%
55
+ .SetVar CommandLine1 .DrawLine 0 %%%%_CurrentY%%%% %%%%_PageWidth%%%% %%%%_CurrentY%%%%
56
56
  .Do CommandLine2
57
57
 
58
58
  .SetVar CommandSubHeading See Also
@@ -6,7 +6,7 @@
6
6
 
7
7
  .SetVar CommandSubHeading Syntax
8
8
  .Do CommandSubHeading
9
- .SetVar CommandLine1 .DrawTextBox Left Top Width Height Horizontal-alignment Vertical-alignment Text
9
+ .SetVar CommandLine1 .DrawTextBox Left Top Width Height Horizontal-alignment Vertical-alignment Text
10
10
  .Do CommandLine2
11
11
 
12
12
  .SetVar CommandSubHeading Parameters
@@ -1,6 +1,8 @@
1
1
  .SetVar CommandName DrawTextWrapped
2
2
  .Do CommandHeading
3
- .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage Draw text at the given point on the page, relative to the page margins, wrapping to one or more new lines as required.
3
+ .SetVar CommandLine1 Draw text at the given point on the page, relative to the page margins, wrapping to one or more new lines
4
+ .SetVar CommandLine1 %CommandLine1% as required, and handling overflowing of pages.
5
+ .Do CommandLine1
4
6
 
5
7
  .SetVar CommandSubHeading Syntax
6
8
  .Do CommandSubHeading
@@ -10,15 +12,13 @@
10
12
  .SetVar CommandSubHeading Parameters
11
13
  .Do CommandSubHeading
12
14
  .SetVar CommandLine1 Left
13
- .SetVar CommandLine2 The position of the text, measured from the left margin, in millimeters.
15
+ .SetVar CommandLine2 The position of the text, measured from the left margin.
14
16
  .Do CommandLine2
15
17
  .SetVar CommandLine1 Top
16
- .SetVar CommandLine2 The position of the text, measured from the top margin, in millimeters.
18
+ .SetVar CommandLine2 The position of the text, measured from the top margin.
17
19
  .Do CommandLine2
18
20
  .SetVar CommandLine1 MaxWidth
19
- .SetVar CommandLine2 The maximum width of text to be output on each line before wrapping to
20
- .Do CommandLine2
21
- .SetVar CommandLine2 a new line.
21
+ .SetVar CommandLine2 The maximum width of text to be output on each line before wrapping to a new line.
22
22
  .Do CommandLine2
23
23
  .SetVar CommandLine1 CmdGroup
24
24
  .SetVar CommandLine2 The name of a command group (macro) to be run prior to the output of
@@ -34,19 +34,42 @@
34
34
  .SetVar CommandSubHeading Other
35
35
  .Do CommandSubHeading
36
36
 
37
- .SetVar LongText The variable _LastResult is always set to '1'. \n\nThe variable _CurrentX is set to the starting left position
38
- .SetVar LongText %LongText% of the text plus the maximum width of the text plus the value of the current horizontal spacing variable, _SpaceHoz.
39
- .SetVar LongText %LongText% \n\nThe variable _CurrentY is incremented by the height plus the value of the current vertical
40
- .SetVar LongText %LongText% spacing variable, _SpaceVert, for each line written. \n\nThe variable _LastObjectHeight is
41
- .SetVar LongText %LongText% updated to reflect the height of the text just output. \n\nThe variable _LastObjectWidth is set
42
- .SetVar LongText %LongText% to the value of the MaxWidth parameter.
43
- .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %LongText%
37
+ .SetVar text Variable _LastResult is set to '0' if the position falls outside of the
38
+ .SetVar text %text% page margins, or the box area would not fit within the
39
+ .SetVar text %text% page margins, otherwise it is set to '1'.
40
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
41
+ .incCurrentY %halfLineGap%
42
+ .SetVar text The variable _CurrentX is set to the starting left position of the text plus
43
+ .SetVar text %text% the maximum width of the text plus the value of the current horizontal spacing variable, _SpaceHoz.
44
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
45
+ .incCurrentY %halfLineGap%
46
+ .SetVar text The variable _CurrentY is incremented by the height plus the value of the current vertical
47
+ .SetVar text %text% spacing variable, _SpaceVert, for each line written.
48
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
49
+ .incCurrentY %halfLineGap%
50
+ .SetVar text The variable _LastObjectHeight is updated to reflect the height of the text just output.
51
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
52
+
53
+ .incCurrentY %halfLineGap%
54
+ .SetVar text The variable _LastObjectWidth is set to the value of the MaxWidth parameter.
55
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
56
+
57
+ .incCurrentY %halfLineGap%
58
+ .SetVar text If a command group is specified it should check that there is sufficient space to draw each line of text,
59
+ .SetVar text %text% otherwise any text that would extend beyond the bottom page margin will not be drawn.
60
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
44
61
 
45
- .SetVar CommandSubHeading Example
62
+ .incCurrentY %halfLineGap%
63
+ .SetVar text If '*None' is provided for the command group, a check is made before drawing each line of text
64
+ .SetVar text %text% that there is sufficient space on the page. If there is not space, a new page is added to the
65
+ .SetVar text %text% document before drawing the line of text.
66
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
67
+
68
+ .SetVar CommandSubHeading Examples
46
69
  .Do CommandSubHeading
47
- .SetVar LongText Output some text contained in the variable 'myLongText', over one or more lines starting from the left margin
48
- .SetVar LongText %LongText% at the current vertical position on the page. Command group 'CheckPage' is run to check for page overflow.
49
- .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %LongText%
70
+ .SetVar text Output some text contained in the variable 'myLongText', over one or more lines starting from the left margin
71
+ .SetVar text %text% at the current vertical position on the page. Command group 'CheckPage' is run to check for page overflow.
72
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
50
73
  .incCurrentY %halfLineGap%
51
74
  .SetVar CommandLine1 .DrawTextWrapped 0 %%%%_CurrentY%%%% %%%%_PageWidth%%%% CheckPage %%%%myLongText%%%%
52
75
  .Do CommandLine2