jspdf-dynamo 1.0.0 → 1.0.4

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 +26 -23
  2. package/dist/index.d.cts +16 -5
  3. package/dist/index.d.ts +16 -5
  4. package/dist/index.js +26 -23
  5. package/documentation/1. Introduction/Introduction.txt +2 -2
  6. package/documentation/3. Variables/Introduction.txt +15 -12
  7. package/documentation/3. Variables/SystemMaintained.txt +44 -65
  8. package/documentation/4. Commands/AddBookmark.txt +3 -3
  9. package/documentation/4. Commands/AddImageFromFile.txt +3 -3
  10. package/documentation/4. Commands/AddImageFromUrl.txt +4 -7
  11. package/documentation/4. Commands/AddPage.txt +1 -1
  12. package/documentation/4. Commands/CheckPage.txt +2 -2
  13. package/documentation/4. Commands/Commands.txt +7 -0
  14. package/documentation/4. Commands/CopyVar.txt +1 -1
  15. package/documentation/4. Commands/Do.txt +2 -2
  16. package/documentation/4. Commands/DoRepeat.txt +2 -2
  17. package/documentation/4. Commands/DrawBox.txt +2 -2
  18. package/documentation/4. Commands/DrawDebugGrid.txt +2 -2
  19. package/documentation/4. Commands/DrawImage.txt +2 -2
  20. package/documentation/4. Commands/DrawLine.txt +2 -2
  21. package/documentation/4. Commands/DrawTextBox.txt +1 -1
  22. package/documentation/4. Commands/DrawTextWrapped.txt +40 -17
  23. package/documentation/4. Commands/ForEachPage.txt +3 -3
  24. package/documentation/4. Commands/GetEnvVar.txt +2 -2
  25. package/documentation/4. Commands/IfNotBlank.txt +3 -3
  26. package/documentation/4. Commands/IncVar.txt +7 -7
  27. package/documentation/4. Commands/Include.txt +16 -15
  28. package/documentation/4. Commands/IncludeUrl.txt +53 -0
  29. package/documentation/4. Commands/MultVar.txt +7 -7
  30. package/documentation/4. Commands/SavePdf.txt +6 -0
  31. package/documentation/4. Commands/SelectPage.txt +6 -0
  32. package/documentation/4. Commands/SetCurrentX.txt +4 -4
  33. package/documentation/4. Commands/SetCurrentY.txt +2 -2
  34. package/documentation/4. Commands/SetDocumentInfo.txt +3 -3
  35. package/documentation/4. Commands/SetFillColour.txt +8 -25
  36. package/documentation/4. Commands/SetFontName.txt +3 -1
  37. package/documentation/4. Commands/SetFontSize.txt +0 -16
  38. package/documentation/4. Commands/SetFontStyle.txt +28 -10
  39. package/documentation/4. Commands/SetLineColour.txt +9 -27
  40. package/documentation/4. Commands/SetLineWidth.txt +1 -1
  41. package/documentation/4. Commands/SetLogLevel.txt +6 -0
  42. package/documentation/4. Commands/SetMargin.txt +1 -1
  43. package/documentation/4. Commands/SetTextColour.txt +43 -0
  44. package/documentation/4. Commands/SetVar.txt +7 -7
  45. package/documentation/4. Commands/WriteLog.txt +56 -0
  46. package/documentation/Documentation.pdf +2093 -1853
  47. package/documentation/documentation.txt +19 -10
  48. package/examples/1.Simple/simple.pdf +2 -2
  49. package/package.json +10 -4
  50. package/documentation/4. Commands/SetPageOrientation.txt +0 -42
  51. package/documentation/6. Other/PossibleEnhancements.txt +0 -63
  52. package/documentation/6. Other/To Be Documented.txt +0 -50
@@ -44,11 +44,11 @@
44
44
  .SetVar CommandLine1 Read a logo from an image and add it to the top left of the current page.
45
45
  .Do CommandLine
46
46
  .incCurrentY %halfLineGap%
47
- .SetVar CommandLine1 .AddImageFromFile ../images/myLogo.jpg
47
+ .SetVar CommandLine1 .AddImageFromFile ../images/myLogo.jpg
48
48
  .Do CommandLine2
49
- .SetVar CommandLine1 .SetVar IdLogo %%%%_LastImageAdded%%%%
49
+ .SetVar CommandLine1 .SetVar IdLogo %%%%_LastImageAdded%%%%
50
50
  .Do CommandLine2
51
- .SetVar CommandLine1 .DrawImage %%%%IdLogo%%%% 0 0 1
51
+ .SetVar CommandLine1 .DrawImage %%%%IdLogo%%%% 0 0 1
52
52
  .Do CommandLine2
53
53
  .incCurrentY %_FontHeight%
54
54
 
@@ -1,12 +1,9 @@
1
- .SetVar CommandName AddImageFromUrl
1
+ .SetVar CommandName AddImageFromUrl (Browser Only)
2
2
  .Do CommandHeading
3
3
  .SetVar text Reads an image from the given URL and stores it for later output. JsPdfDynamo can use all image types
4
4
  .SetVar text %text% that jsPDF supports, including: BMP, GIF, JPEG, PNG, TIFF and WEBP
5
5
  .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
6
6
  .incCurrentY %halfLineGap%
7
- .SetVar text This command is available for both browser and NodeJs applications.
8
- .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
9
- .incCurrentY %halfLineGap%
10
7
 
11
8
  .SetVar CommandSubHeading Syntax
12
9
  .Do CommandSubHeading
@@ -47,11 +44,11 @@
47
44
  .SetVar CommandLine1 Read a logo from an image and add it to the top left of the current page.
48
45
  .Do CommandLine
49
46
  .incCurrentY %halfLineGap%
50
- .SetVar CommandLine1 .AddImageFromUrl /images/logo.png
47
+ .SetVar CommandLine1 .AddImageFromUrl /images/logo.png
51
48
  .Do CommandLine2
52
- .SetVar CommandLine1 .SetVar IdLogo %%%%_LastImageAdded%%%%
49
+ .SetVar CommandLine1 .SetVar IdLogo %%%%_LastImageAdded%%%%
53
50
  .Do CommandLine2
54
- .SetVar CommandLine1 .DrawImage %%%%IdLogo%%%% 0 0 1
51
+ .SetVar CommandLine1 .DrawImage %%%%IdLogo%%%% 0 0 1
55
52
  .Do CommandLine2
56
53
  .incCurrentY %_FontHeight%
57
54
 
@@ -35,6 +35,6 @@
35
35
  .SetVar CommandLine1 Create a new page with a page size of 'A4':
36
36
  .Do CommandLine
37
37
  .incCurrentY %halfLineGap%
38
- .SetVar CommandLine1 .AddPage A4
38
+ .SetVar CommandLine1 .AddPage a4
39
39
  .Do CommandLine2
40
40
  .incCurrentY %_FontHeight%
@@ -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%
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
@@ -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
@@ -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,7 +81,7 @@
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
 
@@ -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
@@ -1,7 +1,7 @@
1
1
  .SetVar CommandName ForEachPage
2
2
  .Do CommandHeading
3
3
  .DrawText 0 %_CurrentY% Run one or more groups of commands for each page that has been created so far. This
4
- .SetVar CommandLine1 can be used for several purposes, including: to run at the end of the report to .
4
+ .SetVar CommandLine1 can be used at the end of the document generation to:
5
5
  .Do CommandLine
6
6
  .incCurrentY %halfLineGap%
7
7
  .SetVar CommandLine1 * Printing a footer "Page 1 of 4" on each page.
@@ -31,14 +31,14 @@
31
31
  .SetVar CommandLine1 Execute the commands in the 'footer' group on each page:
32
32
  .Do CommandLine
33
33
  .incCurrentY %halfLineGap%
34
- .SetVar CommandLine1 .ForEachPage Footer
34
+ .SetVar CommandLine1 .ForEachPage Footer
35
35
  .Do CommandLine2
36
36
 
37
37
  .incCurrentY %_FontHeight%
38
38
  .SetVar CommandLine1 Print a debug grid on each page (which is specified in the group called 'DrawDebug'):
39
39
  .Do CommandLine
40
40
  .incCurrentY %halfLineGap%
41
- .SetVar CommandLine1 .ForEachPage DrawDebug
41
+ .SetVar CommandLine1 .ForEachPage DrawDebug
42
42
  .Do CommandLine2
43
43
 
44
44
  .incCurrentY %_FontHeight%
@@ -43,14 +43,14 @@
43
43
  .SetVar CommandLine1 Set the variable 'UserTemp' to the value of the current user's temporary directory:
44
44
  .Do CommandLine
45
45
  .incCurrentY %halfLineGap%
46
- .SetVar CommandLine1 .GetEnvVar UserTemp Temp User
46
+ .SetVar CommandLine1 .GetEnvVar UserTemp Temp User
47
47
  .Do CommandLine2
48
48
  .incCurrentY %_FontHeight%
49
49
 
50
50
  .SetVar CommandLine1 Set the variable 'MachineTemp' to the value of the machine's temporary directory:
51
51
  .Do CommandLine
52
52
  .incCurrentY %halfLineGap%
53
- .SetVar CommandLine1 .GetEnvVar MachineTemp Temp Machine
53
+ .SetVar CommandLine1 .GetEnvVar MachineTemp Temp Machine
54
54
  .Do CommandLine2
55
55
 
56
56
  .incCurrentY %_FontHeight%
@@ -34,14 +34,14 @@
34
34
  .SetVar CommandLine1 Print text stored in the variable called 'MyHeading' if it is not blank:
35
35
  .Do CommandLine
36
36
  .incCurrentY %halfLineGap%
37
- .SetVar CommandLine1 .IfNotBlank MyHeading .DrawText 0 %%%%_CurrentY%%%% %%%%MyHeading%%%%
37
+ .SetVar CommandLine1 .IfNotBlank MyHeading .DrawText 0 %%%%_CurrentY%%%% %%%%MyHeading%%%%
38
38
  .Do CommandLine2
39
39
  .incCurrentY %_FontHeight%
40
40
 
41
41
  .SetVar CommandLine1 Process the groups 'continued' and 'AddPage' if the variable called 'more' is not blank:
42
42
  .Do CommandLine
43
43
  .incCurrentY %halfLineGap%
44
- .SetVar CommandLine1 .IfNotBlank MORE .Do continued AddPage
44
+ .SetVar CommandLine1 .IfNotBlank MORE .Do continued AddPage
45
45
  .Do CommandLine2
46
46
  .incCurrentY %_FontHeight%
47
47
 
@@ -50,7 +50,7 @@
50
50
  .SetVar CommandLine1 variable named 'varname' is not blank:
51
51
  .Do CommandLine
52
52
  .incCurrentY %halfLineGap%
53
- .SetVar CommandLine1 .IfNotBlank %%%%VarName%%%% .Do continued AddPage
53
+ .SetVar CommandLine1 .IfNotBlank %%%%VarName%%%% .Do continued AddPage
54
54
  .Do CommandLine2
55
55
 
56
56
  .SetVar CommandSubHeading See Also
@@ -4,7 +4,7 @@
4
4
 
5
5
  .SetVar CommandSubHeading Syntax
6
6
  .Do CommandSubHeading
7
- .SetVar CommandLine1 .IncVar Variable Value Value (etc)
7
+ .SetVar CommandLine1 .IncVar Variable Value Value (etc)
8
8
  .Do CommandLine2
9
9
 
10
10
  .SetVar CommandSubHeading Parameters
@@ -40,27 +40,27 @@
40
40
  .SetVar CommandLine1 Increase the value of the variable 'LineNo' from '3' to '4':
41
41
  .Do CommandLine
42
42
  .incCurrentY %halfLineGap%
43
- .SetVar CommandLine1 .SetVar LineNo 3
43
+ .SetVar CommandLine1 .SetVar LineNo 3
44
44
  .Do CommandLine2
45
- .SetVar CommandLine1 .IncVar LineNo 1
45
+ .SetVar CommandLine1 .IncVar LineNo 1
46
46
  .Do CommandLine2
47
47
  .incCurrentY %_FontHeight%
48
48
 
49
49
  .SetVar CommandLine1 Decrease the value of 'Weight3' from '78.6' to '77.2':
50
50
  .Do CommandLine
51
51
  .incCurrentY %halfLineGap%
52
- .SetVar CommandLine1 .SetVar index 3
52
+ .SetVar CommandLine1 .SetVar index 3
53
53
  .Do CommandLine2
54
- .SetVar CommandLine1 .SetVar Weight%%%%index%%%% 78.6
54
+ .SetVar CommandLine1 .SetVar Weight%%%%index%%%% 78.6
55
55
  .Do CommandLine2
56
- .SetVar CommandLine1 .IncVar Weight%%%%index%%%% -1.4
56
+ .SetVar CommandLine1 .IncVar Weight%%%%index%%%% -1.4
57
57
  .Do CommandLine2
58
58
  .incCurrentY %_FontHeight%
59
59
 
60
60
  .SetVar CommandLine1 Multiple values can be used to increase value of 'total' from 0 to 4.55
61
61
  .Do CommandLine
62
62
  .incCurrentY %halfLineGap%
63
- .SetVar CommandLine1 .SetVar Total 0
63
+ .SetVar CommandLine1 .SetVar Total 0
64
64
  .Do CommandLine2
65
65
  .SetVar CommandLine1 .IncVar Total 5 -2.5 2.05
66
66
  .Do CommandLine2
@@ -1,31 +1,26 @@
1
- .SetVar CommandName Include
1
+ .SetVar CommandName Include (NodeJs Only)
2
2
  .Do CommandHeading
3
- .DrawText 0 %_CurrentY% Include a template into the current document. The template itself may include other templates.
4
- .SetVar CommandLine1 The template must be a text file and located relative to the current directory. The template
5
- .Do CommandLine
6
- .SetVar CommandLine1 may contain individual commands or groups of commands. Any individual commands in the
7
- .Do CommandLine
8
- .SetVar CommandLine1 template are run.
3
+ .SetVar CommandLine1 Load commands from a text file in the file system. The loaded commands may also load other commands.
4
+ .SetVar CommandLine1 %CommandLine1% The text file may contain individual commands or groups of commands.
5
+ .SetVar CommandLine1 %CommandLine1% Commands not within a group will be executed.
9
6
  .Do CommandLine
10
7
 
11
8
  .SetVar CommandSubHeading Syntax
12
9
  .Do CommandSubHeading
13
- .SetVar CommandLine1 .Include FileName
10
+ .SetVar CommandLine1 .Include FileName
14
11
  .Do CommandLine2
15
12
 
16
13
  .SetVar CommandSubHeading Parameters
17
14
  .Do CommandSubHeading
18
15
  .SetVar CommandLine1 FileName
19
- .SetVar CommandLine2 The path and name of the file to be included.
16
+ .SetVar CommandLine2 The path and name of the file from which the commands will be loaded.
20
17
  .Do CommandLine2
21
18
 
22
19
  .SetVar CommandSubHeading Other
23
20
  .Do CommandSubHeading
24
21
  .SetVar CommandLine1 The variable _LastResult is set to '1' if the file is found or '0' if the file could not be found or
25
- .Do CommandLine
26
- .SetVar CommandLine1 opened. Note that the _LastResult of any commands run are not available unless they are
27
- .Do CommandLine
28
- .SetVar CommandLine1 saved within the template file to variables.
22
+ .SetVar CommandLine1 %CommandLine1% opened. Note that the _LastResult of any commands run by the include are not available
23
+ .SetVar CommandLine1 %CommandLine1% and should be saved to variables within the included file if required.
29
24
  .Do CommandLine
30
25
 
31
26
  .SetVar CommandSubHeading Examples
@@ -33,12 +28,18 @@
33
28
  .SetVar CommandLine1 Include the template file StdReportLayout.txt:
34
29
  .Do CommandLine
35
30
  .incCurrentY %halfLineGap%
36
- .SetVar CommandLine1 .Include .\StdReportLayout.txt
31
+ .SetVar CommandLine1 .Include ./StdReportLayout.txt
37
32
  .Do CommandLine2
38
33
  .incCurrentY %_FontHeight%
39
34
  .SetVar CommandLine1 Include the template file specified in the 'ReportType' variable:
40
35
  .Do CommandLine
41
36
  .incCurrentY %halfLineGap%
42
- .SetVar CommandLine1 .Include \tmplates\%%%%ReportType%%%%
37
+ .SetVar CommandLine1 .Include /tmplates/%%%%ReportType%%%%
43
38
  .Do CommandLine2
39
+
40
+ .SetVar CommandSubHeading See Also
41
+ .Do CommandSubHeading
42
+ .SetVar CommandLine1 IncludeUrl
43
+ .Do CommandLine
44
+
44
45
  .incCurrentY %_FontHeight%
@@ -0,0 +1,53 @@
1
+ .SetVar CommandName IncludeUrl (Browser Only)
2
+ .Do CommandHeading
3
+
4
+ .SetVar CommandLine1 Load commands from a document fetched over http. The loaded commands may also load other
5
+ .SetVar CommandLine1 %CommandLine1% commands. The document should be a text file containing individual commands
6
+ .SetVar CommandLine1 %CommandLine1% or groups of commands. Commands not within a group will be executed.
7
+ .Do CommandLine
8
+
9
+ .SetVar CommandSubHeading Syntax
10
+ .Do CommandSubHeading
11
+ .SetVar CommandLine1 .IncludeUrl Url
12
+ .Do CommandLine2
13
+
14
+ .SetVar CommandSubHeading Parameters
15
+ .Do CommandSubHeading
16
+ .SetVar CommandLine1 Url
17
+ .SetVar CommandLine2 The URL from which the commands are to be loaded.
18
+ .Do CommandLine2
19
+
20
+ .SetVar CommandSubHeading Other
21
+ .Do CommandSubHeading
22
+ .SetVar CommandLine1 The variable _LastResult is set to '1' if the commands are loaded from the URL, or '0'
23
+ .SetVar CommandLine1 %CommandLine1% if the document at the URL could not be retrieved. Note that the
24
+ .SetVar CommandLine1 %CommandLine1% _LastResult of any commands run by the include are not available and
25
+ .SetVar CommandLine1 %CommandLine1% should be saved to variables within the included document if required.
26
+ .Do CommandLine
27
+ .incCurrentY %halfLineGap%
28
+ .SetVar CommandLine1 The document is attempted to be retrieved using a 'GET' call of the JavaScript 'fetch' method.
29
+ .SetVar CommandLine1 %CommandLine1% If there are any special requirements to retrieve the document, for example to meet
30
+ .SetVar CommandLine1 %CommandLine1% proxy or security requirements, then these are best handled by the calling program.
31
+ .Do CommandLine
32
+
33
+ .SetVar CommandSubHeading Examples
34
+ .Do CommandSubHeading
35
+ .SetVar CommandLine1 Retrieve and load the invoice template from the current applications templates directory:
36
+ .Do CommandLine
37
+ .incCurrentY %halfLineGap%
38
+ .SetVar CommandLine1 .IncludeUrl /templates/invoice.txt
39
+ .Do CommandLine2
40
+ .incCurrentY %_FontHeight%
41
+
42
+ .SetVar CommandLine1 Retrieve and load the template file specified in the 'DocumentType' variable:
43
+ .Do CommandLine
44
+ .incCurrentY %halfLineGap%
45
+ .SetVar CommandLine1 .Include /templates/%%%%DocumentType%%%%
46
+ .Do CommandLine2
47
+
48
+ .SetVar CommandSubHeading See Also
49
+ .Do CommandSubHeading
50
+ .SetVar CommandLine1 Include
51
+ .Do CommandLine
52
+
53
+ .incCurrentY %_FontHeight%
@@ -37,29 +37,29 @@
37
37
  .SetVar CommandLine1 Multiple the value of the variable 'Total' by '4':
38
38
  .Do CommandLine
39
39
  .incCurrentY %halfLineGap%
40
- .SetVar CommandLine1 .SetVar Total 3
40
+ .SetVar CommandLine1 .SetVar Total 3
41
41
  .Do CommandLine2
42
- .SetVar CommandLine1 .MultVar Total 4
42
+ .SetVar CommandLine1 .MultVar Total 4
43
43
  .Do CommandLine2
44
44
  .incCurrentY %_FontHeight%
45
45
 
46
46
  .SetVar CommandLine1 Decrease the value of 'Weight6' by half from '78.6' to '39.3':
47
47
  .Do CommandLine
48
48
  .incCurrentY %halfLineGap%
49
- .SetVar CommandLine1 .SetVar index 6
49
+ .SetVar CommandLine1 .SetVar index 6
50
50
  .Do CommandLine2
51
- .SetVar CommandLine1 .SetVar Weight%%%%index%%%% 78.6
51
+ .SetVar CommandLine1 .SetVar Weight%%%%index%%%% 78.6
52
52
  .Do CommandLine2
53
- .SetVar CommandLine1 .MultVar Weight%%%%index%%%% 0.5
53
+ .SetVar CommandLine1 .MultVar Weight%%%%index%%%% 0.5
54
54
  .Do CommandLine2
55
55
  .incCurrentY %_FontHeight%
56
56
 
57
57
  .SetVar CommandLine1 Multiple values can be used to increase value of 'total' from 1 to 5
58
58
  .Do CommandLine
59
59
  .incCurrentY %halfLineGap%
60
- .SetVar CommandLine1 .SetVar Total 1
60
+ .SetVar CommandLine1 .SetVar Total 1
61
61
  .Do CommandLine2
62
- .SetVar CommandLine1 .MultVar Total 10 -0.5 -1
62
+ .SetVar CommandLine1 .MultVar Total 10 -0.5 -1
63
63
  .Do CommandLine2
64
64
  .incCurrentY %_FontHeight%
65
65
 
@@ -0,0 +1,6 @@
1
+ .SetVar CommandName SavePdf
2
+ .Do CommandHeading
3
+ .SetVar CommandLine1 To be documented.
4
+ .Do CommandLine
5
+
6
+ .incCurrentY %_FontHeight%
@@ -0,0 +1,6 @@
1
+ .SetVar CommandName SelectPage
2
+ .Do CommandHeading
3
+ .SetVar CommandLine1 To be documented.
4
+ .Do CommandLine
5
+
6
+ .incCurrentY %_FontHeight%
@@ -12,22 +12,22 @@
12
12
  .SetVar CommandSubHeading Parameters
13
13
  .Do CommandSubHeading
14
14
  .SetVar CommandLine1 Value
15
- .SetVar CommandLine2 The value to assign to the current left position, expressed in millimeters.
15
+ .SetVar CommandLine2 The value to assign to the current left position.
16
16
  .Do CommandLine2
17
17
 
18
18
  .SetVar CommandSubHeading Examples
19
19
  .Do CommandSubHeading
20
- .SetVar CommandLine1 Set the current left position :
20
+ .SetVar CommandLine1 Set the current left position:
21
21
  .Do CommandLine
22
22
  .incCurrentY %halfLineGap%
23
- .SetVar CommandLine1 .setCurrentX 15
23
+ .SetVar CommandLine1 .setCurrentX 15
24
24
  .Do CommandLine2
25
25
  .incCurrentY %_FontHeight%
26
26
 
27
27
  .SetVar CommandLine1 Use a substitution variable to set the current left position:
28
28
  .Do CommandLine
29
29
  .incCurrentY %halfLineGap%
30
- .SetVar CommandLine1 .setCurrentX %%%%myIndent%%%%
30
+ .SetVar CommandLine1 .setCurrentX %%%%myIndent%%%%
31
31
  .Do CommandLine2
32
32
 
33
33
  .SetVar CommandSubHeading See Also
@@ -12,12 +12,12 @@
12
12
  .SetVar CommandSubHeading Parameters
13
13
  .Do CommandSubHeading
14
14
  .SetVar CommandLine1 Value
15
- .SetVar CommandLine2 The value to assign to the current top position, expressed in millimeters.
15
+ .SetVar CommandLine2 The value to assign to the current top position.
16
16
  .Do CommandLine2
17
17
 
18
18
  .SetVar CommandSubHeading Examples
19
19
  .Do CommandSubHeading
20
- .SetVar CommandLine1 Set the current top position :
20
+ .SetVar CommandLine1 Set the current top position:
21
21
  .Do CommandLine
22
22
  .incCurrentY %halfLineGap%
23
23
  .SetVar CommandLine1 .setCurrentY 14
@@ -4,7 +4,7 @@
4
4
 
5
5
  .SetVar CommandSubHeading Syntax
6
6
  .Do CommandSubHeading
7
- .SetVar CommandLine1 .SetDocumentInfo Property Value
7
+ .SetVar CommandLine1 .SetDocumentInfo Property Value
8
8
  .Do CommandLine2
9
9
 
10
10
  .SetVar CommandSubHeading Parameters
@@ -27,9 +27,9 @@
27
27
 
28
28
  .SetVar CommandSubHeading Examples
29
29
  .Do CommandSubHeading
30
- .SetVar CommandLine1 .SetDocumentInfo Author 12th Level
30
+ .SetVar CommandLine1 .SetDocumentInfo Author ACME Automation Inc.
31
31
  .Do CommandLine2
32
32
  .incCurrentY %halfLineGap%
33
- .SetVar CommandLine1 .SetDocumentInfo Title Weekly Status Report %%%%ReportDate%%%%
33
+ .SetVar CommandLine1 .SetDocumentInfo Title Weekly Status Report %%%%ReportDate%%%%
34
34
  .Do CommandLine2
35
35
  .incCurrentY %_FontHeight%