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.
- package/dist/index.cjs +90 -30
- package/dist/index.d.cts +18 -6
- package/dist/index.d.ts +18 -6
- package/dist/index.js +90 -30
- package/documentation/3. Variables/Introduction.txt +15 -12
- package/documentation/3. Variables/SystemMaintained.txt +47 -63
- package/documentation/4. Commands/AddBookmark.txt +4 -4
- package/documentation/4. Commands/AddPage.txt +6 -4
- package/documentation/4. Commands/CheckPage.txt +3 -3
- package/documentation/4. Commands/Commands.txt +7 -0
- package/documentation/4. Commands/CopyVar.txt +3 -3
- package/documentation/4. Commands/DivVar.txt +67 -0
- package/documentation/4. Commands/Do.txt +3 -3
- package/documentation/4. Commands/DoRepeat.txt +3 -3
- package/documentation/4. Commands/DrawBox.txt +3 -3
- package/documentation/4. Commands/DrawDebugGrid.txt +3 -3
- package/documentation/4. Commands/DrawImage.txt +4 -4
- package/documentation/4. Commands/DrawLine.txt +3 -3
- package/documentation/4. Commands/DrawTextBox.txt +1 -1
- package/documentation/4. Commands/DrawTextWrapped.txt +40 -17
- package/documentation/4. Commands/ForEachPage.txt +4 -4
- package/documentation/4. Commands/GetEnvVar.txt +2 -2
- package/documentation/4. Commands/IfEq.txt +53 -0
- package/documentation/4. Commands/IfGt.txt +1 -1
- package/documentation/4. Commands/IfNotBlank.txt +3 -3
- package/documentation/4. Commands/IncCurrentX.txt +1 -1
- package/documentation/4. Commands/IncCurrentY.txt +1 -1
- package/documentation/4. Commands/IncVar.txt +8 -8
- package/documentation/4. Commands/Include.txt +8 -8
- package/documentation/4. Commands/IncludeUrl.txt +43 -1
- package/documentation/4. Commands/{AddImageFromFile.txt → LoadImageFromFile.txt } +6 -6
- package/documentation/4. Commands/{AddImageFromUrl.txt → LoadImageFromUrl.txt } +6 -6
- package/documentation/4. Commands/MultVar.txt +11 -14
- package/documentation/4. Commands/SavePdf.txt +6 -0
- package/documentation/4. Commands/SelectPage.txt +6 -0
- package/documentation/4. Commands/SetCurrentX.txt +5 -5
- package/documentation/4. Commands/SetCurrentY.txt +3 -3
- package/documentation/4. Commands/SetDocumentInfo.txt +3 -3
- package/documentation/4. Commands/SetFillColour.txt +8 -25
- package/documentation/4. Commands/SetFontName.txt +3 -1
- package/documentation/4. Commands/SetFontSize.txt +2 -0
- package/documentation/4. Commands/SetLineColour.txt +8 -26
- package/documentation/4. Commands/SetLineWidth.txt +7 -7
- package/documentation/4. Commands/SetLogLevel.txt +6 -0
- package/documentation/4. Commands/SetMargin.txt +11 -14
- package/documentation/4. Commands/SetTextColour.txt +43 -0
- package/documentation/4. Commands/SetVar.txt +9 -10
- package/documentation/4. Commands/WriteLog.txt +56 -0
- package/documentation/Documentation.pdf +3430 -2703
- package/documentation/documentation.txt +13 -12
- package/package.json +2 -2
- package/documentation/4. Commands/SetPageOrientation.txt +0 -42
|
@@ -81,14 +81,14 @@
|
|
|
81
81
|
[End]
|
|
82
82
|
|
|
83
83
|
[Footer]
|
|
84
|
-
.SetVar top %_PageHeight%
|
|
85
|
-
.incVar top -%_FontHeight%
|
|
86
84
|
.setMargin t 7
|
|
87
85
|
.setFontStyle Bold
|
|
88
86
|
.setFontSize 18
|
|
89
87
|
.SetTextColour red
|
|
90
88
|
.ifGt %_PageNo% 1 .DrawTextBox 0 0 %_PageWidth% 8 centered centered *** Draft ***
|
|
91
|
-
.Do SetDefaultText
|
|
89
|
+
.Do SetDefaultText
|
|
90
|
+
.SetVar top %_PageHeight%
|
|
91
|
+
.incVar top -%_FontHeight%
|
|
92
92
|
.ifGt %_PageNo% 1 .DrawTextBox 0 %top% %_PageWidth% %_FontHeight% centered centered Page %_PageNo% of %LastPage%
|
|
93
93
|
[End]
|
|
94
94
|
|
|
@@ -216,15 +216,12 @@
|
|
|
216
216
|
.Include ./Documentation/3. Variables/Introduction.txt
|
|
217
217
|
.Include ./Documentation/3. Variables/SystemMaintained.txt
|
|
218
218
|
|
|
219
|
-
.
|
|
220
|
-
.do ChapterHeading
|
|
221
|
-
|
|
219
|
+
.Include ./Documentation/4. Commands/Commands.txt
|
|
222
220
|
.Include ./Documentation/4. Commands/AddBookmark.txt
|
|
223
|
-
.Include ./Documentation/4. Commands/AddImageFromFile.txt
|
|
224
|
-
.Include ./Documentation/4. Commands/AddImageFromUrl.txt
|
|
225
221
|
.Include ./Documentation/4. Commands/AddPage.txt
|
|
226
222
|
.Include ./Documentation/4. Commands/CheckPage.txt
|
|
227
223
|
.Include ./Documentation/4. Commands/CopyVar.txt
|
|
224
|
+
.Include ./Documentation/4. Commands/DivVar.txt
|
|
228
225
|
.Include ./Documentation/4. Commands/Do.txt
|
|
229
226
|
.Include ./Documentation/4. Commands/DoRepeat.txt
|
|
230
227
|
.Include ./Documentation/4. Commands/DrawBox.txt
|
|
@@ -236,6 +233,7 @@
|
|
|
236
233
|
.Include ./Documentation/4. Commands/DrawTextWrapped.txt
|
|
237
234
|
.Include ./Documentation/4. Commands/ForEachPage.txt
|
|
238
235
|
.Include ./Documentation/4. Commands/IfBlank.txt
|
|
236
|
+
.Include ./Documentation/4. Commands/IfEq.txt
|
|
239
237
|
.Include ./Documentation/4. Commands/IfGt.txt
|
|
240
238
|
.Include ./Documentation/4. Commands/IfNotBlank.txt
|
|
241
239
|
.Include ./Documentation/4. Commands/incCurrentX.txt
|
|
@@ -243,7 +241,11 @@
|
|
|
243
241
|
.Include ./Documentation/4. Commands/Include.txt
|
|
244
242
|
.Include ./Documentation/4. Commands/IncludeUrl.txt
|
|
245
243
|
.Include ./Documentation/4. Commands/IncVar.txt
|
|
244
|
+
.Include ./Documentation/4. Commands/LoadImageFromFile.txt
|
|
245
|
+
.Include ./Documentation/4. Commands/LoadImageFromUrl.txt
|
|
246
246
|
.Include ./Documentation/4. Commands/MultVar.txt
|
|
247
|
+
.Include ./Documentation/4. Commands/SavePdf.txt
|
|
248
|
+
.Include ./Documentation/4. Commands/SelectPage.txt
|
|
247
249
|
.Include ./Documentation/4. Commands/setCurrentX.txt
|
|
248
250
|
.Include ./Documentation/4. Commands/setCurrentY.txt
|
|
249
251
|
.Include ./Documentation/4. Commands/SetDocumentInfo.txt
|
|
@@ -253,9 +255,11 @@
|
|
|
253
255
|
.Include ./Documentation/4. Commands/SetFontStyle.txt
|
|
254
256
|
.Include ./Documentation/4. Commands/SetLineColour.txt
|
|
255
257
|
.Include ./Documentation/4. Commands/SetLineWidth.txt
|
|
258
|
+
.Include ./Documentation/4. Commands/SetLogLevel.txt
|
|
256
259
|
.Include ./Documentation/4. Commands/SetMargin.txt
|
|
257
|
-
.Include ./Documentation/4. Commands/
|
|
260
|
+
.Include ./Documentation/4. Commands/SetTextColour.txt
|
|
258
261
|
.Include ./Documentation/4. Commands/SetVar.txt
|
|
262
|
+
.Include ./Documentation/4. Commands/WriteLog.txt
|
|
259
263
|
|
|
260
264
|
.SetVar ChapterName Other Definitions
|
|
261
265
|
.do ChapterHeading
|
|
@@ -263,9 +267,6 @@
|
|
|
263
267
|
.Include ./Documentation/5. Other Definitions/logger.txt
|
|
264
268
|
.Include ./Documentation/5. Other Definitions/pageSizes.txt
|
|
265
269
|
|
|
266
|
-
.Include ./Documentation/6. Other/PossibleEnhancements.txt
|
|
267
|
-
.Include ./Documentation/6. Other/To Be Documented.txt
|
|
268
|
-
|
|
269
270
|
.SetVar LastPage %_PageNo%
|
|
270
271
|
.Do SetMargins SetDefaultText
|
|
271
272
|
.SetMargin b %margins%
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jspdf-dynamo",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Generate data driven PDFs from dynamic templates",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"author": "Stephen Corbett <corbett@corbtech.com.au> (https://corbtech.com.au)",
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"jspdf": "^2.5.
|
|
36
|
+
"jspdf": "^2.5.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@arethetypeswrong/cli": "^0.15.4",
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
.SetVar CommandName SetPageOrientation
|
|
2
|
-
.Do CommandHeading
|
|
3
|
-
.DrawText 0 %_CurrentY% Set the orientation for the current page. Usually this would be used after creating a new
|
|
4
|
-
.SetVar CommandLine1 page. The default orientation is portrait and the setting is retained for the current and
|
|
5
|
-
.Do CommandLine
|
|
6
|
-
.SetVar CommandLine1 subsequent pages or until another SetPageOrientation is specified.
|
|
7
|
-
.Do CommandLine
|
|
8
|
-
|
|
9
|
-
.SetVar CommandSubHeading Syntax
|
|
10
|
-
.Do CommandSubHeading
|
|
11
|
-
.SetVar CommandLine1 .SetPageOrientation Orientation
|
|
12
|
-
.Do CommandLine2
|
|
13
|
-
|
|
14
|
-
.SetVar CommandSubHeading Parameters
|
|
15
|
-
.Do CommandSubHeading
|
|
16
|
-
.SetVar CommandLine1 Orientation
|
|
17
|
-
.SetVar CommandLine2 Set the page orientation: P or Portrait (default), L or Landscape.
|
|
18
|
-
.Do CommandLine2
|
|
19
|
-
|
|
20
|
-
.SetVar CommandSubHeading Other
|
|
21
|
-
.Do CommandSubHeading
|
|
22
|
-
.SetVar CommandLine1 Variable _LastResult is set to '1'. The variables _PageWidth and _Page_Height are
|
|
23
|
-
.Do CommandLine
|
|
24
|
-
.SetVar CommandLine1 calculated based on the current page size and margins.
|
|
25
|
-
.Do CommandLine
|
|
26
|
-
|
|
27
|
-
.SetVar CommandSubHeading Examples
|
|
28
|
-
.Do CommandSubHeading
|
|
29
|
-
.SetVar CommandLine1 Set the orientation to landscape:
|
|
30
|
-
.Do CommandLine
|
|
31
|
-
.incCurrentY %halfLineGap%
|
|
32
|
-
.SetVar CommandLine1 .SetPageOrientation L
|
|
33
|
-
.Do CommandLine2
|
|
34
|
-
|
|
35
|
-
.incCurrentY %_FontHeight%
|
|
36
|
-
.SetVar CommandLine1 Set the orientation to portrait:
|
|
37
|
-
.Do CommandLine
|
|
38
|
-
.incCurrentY %halfLineGap%
|
|
39
|
-
.SetVar CommandLine1 .SetPageOrientation Portrait
|
|
40
|
-
.Do CommandLine2
|
|
41
|
-
|
|
42
|
-
.incCurrentY %_FontHeight%
|