jspdf-dynamo 1.0.0

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 (66) hide show
  1. package/LICENSE +8 -0
  2. package/README.md +93 -0
  3. package/dist/index.cjs +2175 -0
  4. package/dist/index.d.cts +370 -0
  5. package/dist/index.d.ts +370 -0
  6. package/dist/index.js +2145 -0
  7. package/documentation/1. Introduction/Introduction.txt +91 -0
  8. package/documentation/2. JsPdfDynamo/JsPdfDynamo.txt +6 -0
  9. package/documentation/2. JsPdfDynamo/constructor.txt +31 -0
  10. package/documentation/2. JsPdfDynamo/getVariable.txt +29 -0
  11. package/documentation/2. JsPdfDynamo/prepareWrappedString.txt +28 -0
  12. package/documentation/2. JsPdfDynamo/processCommands.txt +27 -0
  13. package/documentation/2. JsPdfDynamo/toBlob.txt +19 -0
  14. package/documentation/2. JsPdfDynamo/toBlobUrl.txt +36 -0
  15. package/documentation/3. Variables/Introduction.txt +36 -0
  16. package/documentation/3. Variables/SystemMaintained.txt +190 -0
  17. package/documentation/4. Commands/AddBookmark.txt +47 -0
  18. package/documentation/4. Commands/AddImageFromFile.txt +59 -0
  19. package/documentation/4. Commands/AddImageFromUrl.txt +63 -0
  20. package/documentation/4. Commands/AddPage.txt +40 -0
  21. package/documentation/4. Commands/CheckPage.txt +52 -0
  22. package/documentation/4. Commands/CopyVar.txt +52 -0
  23. package/documentation/4. Commands/Do.txt +40 -0
  24. package/documentation/4. Commands/DoRepeat.txt +51 -0
  25. package/documentation/4. Commands/DrawBox.txt +67 -0
  26. package/documentation/4. Commands/DrawDebugGrid.txt +41 -0
  27. package/documentation/4. Commands/DrawImage.txt +92 -0
  28. package/documentation/4. Commands/DrawLine.txt +62 -0
  29. package/documentation/4. Commands/DrawText.txt +61 -0
  30. package/documentation/4. Commands/DrawTextBox.txt +99 -0
  31. package/documentation/4. Commands/DrawTextWrapped.txt +65 -0
  32. package/documentation/4. Commands/ForEachPage.txt +44 -0
  33. package/documentation/4. Commands/GetEnvVar.txt +56 -0
  34. package/documentation/4. Commands/IfBlank.txt +63 -0
  35. package/documentation/4. Commands/IfGt.txt +58 -0
  36. package/documentation/4. Commands/IfNotBlank.txt +60 -0
  37. package/documentation/4. Commands/IncCurrentX.txt +52 -0
  38. package/documentation/4. Commands/IncCurrentY.txt +50 -0
  39. package/documentation/4. Commands/IncVar.txt +73 -0
  40. package/documentation/4. Commands/Include.txt +44 -0
  41. package/documentation/4. Commands/MultVar.txt +70 -0
  42. package/documentation/4. Commands/SetCurrentX.txt +37 -0
  43. package/documentation/4. Commands/SetCurrentY.txt +37 -0
  44. package/documentation/4. Commands/SetDocumentInfo.txt +35 -0
  45. package/documentation/4. Commands/SetFillColour.txt +58 -0
  46. package/documentation/4. Commands/SetFontName.txt +4 -0
  47. package/documentation/4. Commands/SetFontSize.txt +22 -0
  48. package/documentation/4. Commands/SetFontStyle.txt +55 -0
  49. package/documentation/4. Commands/SetLineColour.txt +58 -0
  50. package/documentation/4. Commands/SetLineWidth.txt +42 -0
  51. package/documentation/4. Commands/SetMargin.txt +69 -0
  52. package/documentation/4. Commands/SetPageOrientation.txt +42 -0
  53. package/documentation/4. Commands/SetVar.txt +69 -0
  54. package/documentation/5. Other Definitions/jsPdfOptions.txt +56 -0
  55. package/documentation/5. Other Definitions/logger.txt +35 -0
  56. package/documentation/5. Other Definitions/pageSizes.txt +41 -0
  57. package/documentation/6. Other/PossibleEnhancements.txt +63 -0
  58. package/documentation/6. Other/To Be Documented.txt +50 -0
  59. package/documentation/Documentation.pdf +9859 -0
  60. package/documentation/README.md +7 -0
  61. package/documentation/documentation.txt +266 -0
  62. package/documentation/gendoc.spec.ts +22 -0
  63. package/examples/1.Simple/simple.pdf +247 -0
  64. package/examples/1.Simple/template.txt +21 -0
  65. package/examples/examples.spec.ts +26 -0
  66. package/package.json +58 -0
@@ -0,0 +1,65 @@
1
+ .SetVar CommandName DrawTextWrapped
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.
4
+
5
+ .SetVar CommandSubHeading Syntax
6
+ .Do CommandSubHeading
7
+ .SetVar CommandLine1 .DrawTextWrapped Left Top MaxWidth CmdGroup Text
8
+ .Do CommandLine2
9
+
10
+ .SetVar CommandSubHeading Parameters
11
+ .Do CommandSubHeading
12
+ .SetVar CommandLine1 Left
13
+ .SetVar CommandLine2 The position of the text, measured from the left margin, in millimeters.
14
+ .Do CommandLine2
15
+ .SetVar CommandLine1 Top
16
+ .SetVar CommandLine2 The position of the text, measured from the top margin, in millimeters.
17
+ .Do CommandLine2
18
+ .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.
22
+ .Do CommandLine2
23
+ .SetVar CommandLine1 CmdGroup
24
+ .SetVar CommandLine2 The name of a command group (macro) to be run prior to the output of
25
+ .Do CommandLine2
26
+ .SetVar CommandLine2 each line. This is usually used to detect for end of page and process
27
+ .Do CommandLine2
28
+ .SetVar CommandLine2 accordingly. Use the special value *None if no command group is to be run.
29
+ .Do CommandLine2
30
+ .SetVar CommandLine1 Text
31
+ .SetVar CommandLine2 The text to be output using the current font type, style and size.
32
+ .Do CommandLine2
33
+
34
+ .SetVar CommandSubHeading Other
35
+ .Do CommandSubHeading
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%
44
+
45
+ .SetVar CommandSubHeading Example
46
+ .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%
50
+ .incCurrentY %halfLineGap%
51
+ .SetVar CommandLine1 .DrawTextWrapped 0 %%%%_CurrentY%%%% %%%%_PageWidth%%%% CheckPage %%%%myLongText%%%%
52
+ .Do CommandLine2
53
+
54
+ .incCurrentY %_FontHeight%
55
+ .SetVar LongText Substitution variables can be used in the text. In this example, no command group is run to check for page overflow.
56
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %LongText%
57
+ .incCurrentY %halfLineGap%
58
+ .SetVar CommandLine1 .DrawTextWrapped 15 30 *none Who does number %%%%number%%%% work for?
59
+ .Do CommandLine2
60
+
61
+ .SetVar CommandSubHeading See Also
62
+ .Do CommandSubHeading
63
+ .SetVar CommandLine1 DrawText, DrawTextBox, SetFontName, SetFontSize, SetFontStyle, SetTextColour
64
+ .Do CommandLine2
65
+ .incCurrentY %_FontHeight%
@@ -0,0 +1,44 @@
1
+ .SetVar CommandName ForEachPage
2
+ .Do CommandHeading
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 .
5
+ .Do CommandLine
6
+ .incCurrentY %halfLineGap%
7
+ .SetVar CommandLine1 * Printing a footer "Page 1 of 4" on each page.
8
+ .Do CommandLine2
9
+ .incCurrentY %halfLineGap%
10
+ .SetVar CommandLine1 * Printing a debug grid on each page.
11
+ .Do CommandLine2
12
+
13
+ .SetVar CommandSubHeading Syntax
14
+ .Do CommandSubHeading
15
+ .SetVar CommandLine1 .ForEachPage Group1, Group2...etc
16
+ .Do CommandLine2
17
+
18
+ .SetVar CommandSubHeading Parameters
19
+ .Do CommandSubHeading
20
+ .SetVar CommandLine1 Group(s)
21
+ .SetVar CommandLine2 Zero or more groups to be processed on each page
22
+ .Do CommandLine2
23
+
24
+ .SetVar CommandSubHeading Other
25
+ .Do CommandSubHeading
26
+ .SetVar CommandLine1 Variable _LastResult is always set to '1'. The current page will be set to the last page.
27
+ .Do CommandLine
28
+
29
+ .SetVar CommandSubHeading Examples
30
+ .Do CommandSubHeading
31
+ .SetVar CommandLine1 Execute the commands in the 'footer' group on each page:
32
+ .Do CommandLine
33
+ .incCurrentY %halfLineGap%
34
+ .SetVar CommandLine1 .ForEachPage Footer
35
+ .Do CommandLine2
36
+
37
+ .incCurrentY %_FontHeight%
38
+ .SetVar CommandLine1 Print a debug grid on each page (which is specified in the group called 'DrawDebug'):
39
+ .Do CommandLine
40
+ .incCurrentY %halfLineGap%
41
+ .SetVar CommandLine1 .ForEachPage DrawDebug
42
+ .Do CommandLine2
43
+
44
+ .incCurrentY %_FontHeight%
@@ -0,0 +1,56 @@
1
+ .SetVar CommandName GetEnvVar
2
+ .Do CommandHeading
3
+ .DrawText 0 %_CurrentY% Sets the value of a variable from an environment variable.
4
+ .Do CommandLine2
5
+
6
+ .SetVar CommandSubHeading Syntax
7
+ .Do CommandSubHeading
8
+ .SetVar CommandLine1 .GetEnvVar VariableName EnvVar Environment
9
+ .Do CommandLine2
10
+
11
+ .SetVar CommandSubHeading Parameters
12
+ .Do CommandSubHeading
13
+ .SetVar CommandLine1 VariableName
14
+ .SetVar CommandLine2 The name of the variable to update or create.
15
+ .Do CommandLine2
16
+ .SetVar CommandLine1 EnvVar
17
+ .SetVar CommandLine2 The name of the environment variable whose values will be assigned to
18
+ .Do CommandLine2
19
+ .SetVar CommandLine2 the specified variable.
20
+ .Do CommandLine2
21
+ .SetVar CommandLine1 Environment
22
+ .SetVar CommandLine2 This optional parameter can be used to specify from where the environment
23
+ .Do CommandLine2
24
+ .SetVar CommandLine2 variable will be obtained. Valid values are not case sensitive and are:
25
+ .Do CommandLine2
26
+ .incCurrentY %halfLineGap%
27
+ .SetVar CommandLine2 * Process (This is the default)
28
+ .Do CommandLine2
29
+ .SetVar CommandLine2 * Machine
30
+ .Do CommandLine2
31
+ .SetVar CommandLine2 * User
32
+ .Do CommandLine2
33
+
34
+ .SetVar CommandSubHeading Other
35
+ .Do CommandSubHeading
36
+ .SetVar CommandLine1 Variable _LastResult is set to '1' if valid variable names are provided and the specified
37
+ .Do CommandLine
38
+ .SetVar CommandLine1 environment variable is found, otherwise _LastResult is set to '0'.
39
+ .Do CommandLine
40
+
41
+ .SetVar CommandSubHeading Examples
42
+ .Do CommandSubHeading
43
+ .SetVar CommandLine1 Set the variable 'UserTemp' to the value of the current user's temporary directory:
44
+ .Do CommandLine
45
+ .incCurrentY %halfLineGap%
46
+ .SetVar CommandLine1 .GetEnvVar UserTemp Temp User
47
+ .Do CommandLine2
48
+ .incCurrentY %_FontHeight%
49
+
50
+ .SetVar CommandLine1 Set the variable 'MachineTemp' to the value of the machine's temporary directory:
51
+ .Do CommandLine
52
+ .incCurrentY %halfLineGap%
53
+ .SetVar CommandLine1 .GetEnvVar MachineTemp Temp Machine
54
+ .Do CommandLine2
55
+
56
+ .incCurrentY %_FontHeight%
@@ -0,0 +1,63 @@
1
+ .SetVar CommandName IfBlank
2
+ .Do CommandHeading
3
+ .SetVar LongText Tests a given variable and if it is blank then process a given command. This can be used
4
+ .SetVar LongText %LongText% to process one or more groups of commands using the 'do' command or perform some other action, such
5
+ .SetVar LongText %LongText% as setting the value of a variable.
6
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %LongText%
7
+
8
+ .SetVar CommandSubHeading Syntax
9
+ .Do CommandSubHeading
10
+ .SetVar CommandLine1 .IfBlank VariableName Command
11
+ .Do CommandLine2
12
+
13
+ .SetVar CommandSubHeading Parameters
14
+ .Do CommandSubHeading
15
+ .SetVar CommandLine1 VariableName
16
+ .SetVar CommandLine2 The name of the variable to check. This does not need to be surrounded
17
+ .Do CommandLine2
18
+ .SetVar CommandLine2 by percentage signs unless the name of the actual variable to check is
19
+ .Do CommandLine2
20
+ .SetVar CommandLine2 given in the variable name parameter.
21
+ .Do CommandLine2
22
+ .SetVar CommandLine1 Command
23
+ .SetVar CommandLine2 The command to execute if the given variable is blank.
24
+ .Do CommandLine2
25
+
26
+ .SetVar CommandSubHeading Other
27
+ .Do CommandSubHeading
28
+ .SetVar CommandLine1 The variable _LastResult is set to '-1' if the variable is not blank, otherwise the result of the
29
+ .Do CommandLine
30
+ .SetVar CommandLine1 last command processed by this command.
31
+ .Do CommandLine
32
+
33
+ .SetVar CommandSubHeading Examples
34
+ .Do CommandSubHeading
35
+ .SetVar CommandLine1 Print a warning message if a variable called 'MyHeading' is blank (or not defined):
36
+ .Do CommandLine
37
+ .incCurrentY %halfLineGap%
38
+ .SetVar CommandLine1 .IfBlank MyHeading .DrawText 0 %%%%_CurrentY%%%% *** No heading provided **
39
+ .Do CommandLine2
40
+ .incCurrentY %_FontHeight%
41
+
42
+ .SetVar CommandLine1 Process the groups 'CloseSection' and 'NewSection' if the variable called 'more' is blank
43
+ .Do CommandLine
44
+ .SetVar CommandLine1 (or not defined):
45
+ .Do CommandLine
46
+ .incCurrentY %halfLineGap%
47
+ .SetVar CommandLine1 .IfBlank MORE .Do CloseSection NewSection
48
+ .Do CommandLine2
49
+ .incCurrentY %_FontHeight%
50
+
51
+ .SetVar CommandLine1 Process the groups 'CloseSection' and 'NewSection' if the variable whose name is stored
52
+ .Do CommandLine
53
+ .SetVar CommandLine1 in the variable named 'varname' is blank (or not defined):
54
+ .Do CommandLine
55
+ .incCurrentY %halfLineGap%
56
+ .SetVar CommandLine1 .IfBlank %%%%VarName%%%% .Do CloseSection NewSection
57
+ .Do CommandLine2
58
+
59
+ .SetVar CommandSubHeading See Also
60
+ .Do CommandSubHeading
61
+ .SetVar CommandLine1 IfGt, IfNotBlank
62
+ .Do CommandLine2
63
+ .incCurrentY %_FontHeight%
@@ -0,0 +1,58 @@
1
+ .SetVar CommandName IfGt
2
+ .Do CommandHeading
3
+ .SetVar text Compares two variables and if the first one is greater then the second then process a given command. This can be used
4
+ .SetVar text %text% to process one or more groups of commands using the 'do' command or perform some other action, such
5
+ .SetVar text %text% as setting the value of a variable. If either of the variables are not numbers then a string comparison is made.
6
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
7
+
8
+ .SetVar CommandSubHeading Syntax
9
+ .Do CommandSubHeading
10
+ .SetVar CommandLine1 .IfGt Value1 Value2 Command
11
+ .Do CommandLine2
12
+
13
+ .SetVar CommandSubHeading Parameters
14
+ .Do CommandSubHeading
15
+ .SetVar CommandLine1 Value1,
16
+ .SetVar CommandLine2 The values to compare. These can either be constants or values of
17
+ .Do CommandLine2
18
+ .SetVar CommandLine1 Value2
19
+ .SetVar CommandLine2 variables using substitution.
20
+ .Do CommandLine2
21
+ .SetVar CommandLine1 Command
22
+ .SetVar CommandLine2 The command to execute if the first value is greater than the second.
23
+ .Do CommandLine2
24
+
25
+ .SetVar CommandSubHeading Other
26
+ .Do CommandSubHeading
27
+ .SetVar text The variable _LastResult is set to '0' if the first variable is less than or equal to the second, otherwise
28
+ .SetVar text %text% _LastResult is set to the result of the last command processed by this command.
29
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
30
+ .incCurrentY %halfLineGap%
31
+ .SetVar text No action is taken if the two variables have the same value or if the second value is greater than the first.
32
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
33
+ .incCurrentY %HalfFontHeight%
34
+ .SetVar text Comparison of string values is case sensitive.
35
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
36
+
37
+ .SetVar CommandSubHeading Examples
38
+ .Do CommandSubHeading
39
+ .SetVar text Set the value of variable 'highest' to the greater of values of variables 'counter1' and 'counter2'.
40
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
41
+ .incCurrentY %halfLineGap%
42
+ .SetVar CommandLine1 .SetVar highest %%%%counter2%%%%
43
+ .Do CommandLine2
44
+ .SetVar CommandLine1 .IfGt %%%%counter1%%%% %%%%counter2%%%% .SetVar highest %%%%counter1%%%%
45
+ .Do CommandLine2
46
+
47
+ .incCurrentY %_FontHeight%
48
+ .SetVar LongText Process the groups 'CloseSection' and 'ApprovalRequired' if the value of the variable 'errorCount' is more than 3.
49
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %LongText%
50
+ .incCurrentY %halfLineGap%
51
+ .SetVar CommandLine1 .IfGt 3 %%%%errorCount%%%% .Do CloseSection ApprovalRequired
52
+ .Do CommandLine2
53
+
54
+ .SetVar CommandSubHeading See Also
55
+ .Do CommandSubHeading
56
+ .SetVar CommandLine1 IfBlank, IfNotBlank
57
+ .Do CommandLine2
58
+ .incCurrentY %_FontHeight%
@@ -0,0 +1,60 @@
1
+ .SetVar CommandName IfNotBlank
2
+ .Do CommandHeading
3
+ .DrawText 0 %_CurrentY% Tests a given variable and if it is not blank then process a given command. This can be
4
+ .SetVar CommandLine1 used to process one or more groups of commands using the 'do' command.
5
+ .Do CommandLine
6
+
7
+ .SetVar CommandSubHeading Syntax
8
+ .Do CommandSubHeading
9
+ .SetVar CommandLine1 .IfNotBlank VariableName Command
10
+ .Do CommandLine2
11
+
12
+ .SetVar CommandSubHeading Parameters
13
+ .Do CommandSubHeading
14
+ .SetVar CommandLine1 VariableName
15
+ .SetVar CommandLine2 The name of the variable to check. This does not need to be surrounded
16
+ .Do CommandLine2
17
+ .SetVar CommandLine2 by percentage signs unless the name of the actual variable to check is
18
+ .Do CommandLine2
19
+ .SetVar CommandLine2 given in the variable name parameter.
20
+ .Do CommandLine2
21
+ .SetVar CommandLine1 Command
22
+ .SetVar CommandLine2 The command to execute if the given variable is not blank.
23
+ .Do CommandLine2
24
+
25
+ .SetVar CommandSubHeading Other
26
+ .Do CommandSubHeading
27
+ .SetVar CommandLine1 The variable _LastResult is set to '-1' if the variable is blank, otherwise the result of the
28
+ .Do CommandLine
29
+ .SetVar CommandLine1 last command processed by this command.
30
+ .Do CommandLine
31
+
32
+ .SetVar CommandSubHeading Examples
33
+ .Do CommandSubHeading
34
+ .SetVar CommandLine1 Print text stored in the variable called 'MyHeading' if it is not blank:
35
+ .Do CommandLine
36
+ .incCurrentY %halfLineGap%
37
+ .SetVar CommandLine1 .IfNotBlank MyHeading .DrawText 0 %%%%_CurrentY%%%% %%%%MyHeading%%%%
38
+ .Do CommandLine2
39
+ .incCurrentY %_FontHeight%
40
+
41
+ .SetVar CommandLine1 Process the groups 'continued' and 'AddPage' if the variable called 'more' is not blank:
42
+ .Do CommandLine
43
+ .incCurrentY %halfLineGap%
44
+ .SetVar CommandLine1 .IfNotBlank MORE .Do continued AddPage
45
+ .Do CommandLine2
46
+ .incCurrentY %_FontHeight%
47
+
48
+ .SetVar CommandLine1 Process the groups 'continued' and 'AddPage' if the variable whose name is stored in the
49
+ .Do CommandLine
50
+ .SetVar CommandLine1 variable named 'varname' is not blank:
51
+ .Do CommandLine
52
+ .incCurrentY %halfLineGap%
53
+ .SetVar CommandLine1 .IfNotBlank %%%%VarName%%%% .Do continued AddPage
54
+ .Do CommandLine2
55
+
56
+ .SetVar CommandSubHeading See Also
57
+ .Do CommandSubHeading
58
+ .SetVar CommandLine1 IgGt, IfBlank
59
+ .Do CommandLine2
60
+ .incCurrentY %_FontHeight%
@@ -0,0 +1,52 @@
1
+ .SetVar CommandName incCurrentX
2
+ .Do CommandHeading
3
+
4
+ .DrawText 0 %_CurrentY% Increment (or decrement) the JsPdfDynamo maintained _CurrentX variable.
5
+
6
+ .SetVar CommandSubHeading Syntax
7
+ .Do CommandSubHeading
8
+ .SetVar CommandLine1 .incCurrentX Value Value (etc)
9
+ .Do CommandLine2
10
+
11
+ .SetVar CommandSubHeading Parameters
12
+ .Do CommandSubHeading
13
+ .SetVar CommandLine1 Value
14
+ .SetVar CommandLine2 One or more values to increment the _CurrentX variable by. These can be
15
+ .Do CommandLine2
16
+ .SetVar CommandLine2 constants or substitution variables.
17
+ .Do CommandLine2
18
+
19
+ .SetVar CommandSubHeading Other
20
+ .Do CommandSubHeading
21
+ .SetVar CommandLine1 The _CurrentX variable can be decremented by using a negative value.
22
+ .Do CommandLine
23
+
24
+ .SetVar CommandSubHeading Examples
25
+ .Do CommandSubHeading
26
+ .SetVar CommandLine1 Increase the value of the _CurrentX variable by 2.4mm:
27
+ .Do CommandLine
28
+ .incCurrentY %halfLineGap%
29
+ .SetVar CommandLine1 .incCurrentX 2.4
30
+ .Do CommandLine2
31
+
32
+ .incCurrentY %_FontHeight%
33
+ .SetVar CommandLine1 Decrease the value of the _CurrentX variable by the width of the last text written:
34
+ .Do CommandLine
35
+ .incCurrentY %halfLineGap%
36
+ .SetVar CommandLine1 .DrawText %%%%_CurrentX%%%% %%%%_CurrentY%%%% Here's some text
37
+ .Do CommandLine2
38
+ .SetVar CommandLine1 .incCurrentX -%%%%_LastObjectWidth%%%%
39
+ .Do CommandLine2
40
+
41
+ .incCurrentY %_FontHeight%
42
+ .SetVar CommandLine1 Multiple values can be used to increase the value of the _CurrentX variable by 8mm:
43
+ .Do CommandLine
44
+ .incCurrentY %halfLineGap%
45
+ .SetVar CommandLine1 .incCurrentX 5 1 2
46
+ .Do CommandLine2
47
+
48
+ .SetVar CommandSubHeading See Also
49
+ .Do CommandSubHeading
50
+ .SetVar CommandLine1 incCurrentY, setCurrentX, setCurrentY, Variables
51
+ .Do CommandLine2
52
+ .incCurrentY %_FontHeight%
@@ -0,0 +1,50 @@
1
+ .SetVar CommandName incCurrentY
2
+ .Do CommandHeading
3
+
4
+ .DrawText 0 %_CurrentY% Increment (or decrement) the JsPdfDynamo maintained _CurrentY variable.
5
+
6
+ .SetVar CommandSubHeading Syntax
7
+ .Do CommandSubHeading
8
+ .SetVar CommandLine1 .incCurrentY Value Value (etc)
9
+ .Do CommandLine2
10
+
11
+ .SetVar CommandSubHeading Parameters
12
+ .Do CommandSubHeading
13
+ .SetVar CommandLine1 Value
14
+ .SetVar CommandLine2 One or more values to increment the _CurrentY variable by. These can be
15
+ .Do CommandLine2
16
+ .SetVar CommandLine2 constants or substitution variables.
17
+ .Do CommandLine2
18
+
19
+ .SetVar CommandSubHeading Other
20
+ .Do CommandSubHeading
21
+ .SetVar CommandLine1 The _CurrentY variable can be decremented by using a negative value.
22
+ .Do CommandLine
23
+
24
+ .SetVar CommandSubHeading Examples
25
+ .Do CommandSubHeading
26
+ .SetVar CommandLine1 Increase the value of the _CurrentY variable by 5mm:
27
+ .Do CommandLine
28
+ .incCurrentY %halfLineGap%
29
+ .SetVar CommandLine1 .incCurrentY 5
30
+ .Do CommandLine2
31
+
32
+ .incCurrentY %_FontHeight%
33
+ .SetVar CommandLine1 Decrease the value of the _CurrentY variable by the current font height:
34
+ .Do CommandLine
35
+ .incCurrentY %halfLineGap%
36
+ .SetVar CommandLine1 .incCurrentY -%%%%_FontHeight%%%%
37
+ .Do CommandLine2
38
+
39
+ .incCurrentY %_FontHeight%
40
+ .SetVar CommandLine1 Multiple values can be used to increase the value of the _CurrentY variable by 8mm:
41
+ .Do CommandLine
42
+ .incCurrentY %halfLineGap%
43
+ .SetVar CommandLine1 .incCurrentY 5 1 2
44
+ .Do CommandLine2
45
+
46
+ .SetVar CommandSubHeading See Also
47
+ .Do CommandSubHeading
48
+ .SetVar CommandLine1 incCurrentX, setCurrentX, setCurrentY, Variables
49
+ .Do CommandLine2
50
+ .incCurrentY %_FontHeight%
@@ -0,0 +1,73 @@
1
+ .SetVar CommandName IncVar
2
+ .Do CommandHeading
3
+ .DrawText 0 %_CurrentY% Increment (or decrement) the value of a variable by one or more values.
4
+
5
+ .SetVar CommandSubHeading Syntax
6
+ .Do CommandSubHeading
7
+ .SetVar CommandLine1 .IncVar 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
+ .Do CommandLine2
15
+ .SetVar CommandLine2 but it can be, or contain substitution variables. The variable must exist.
16
+ .Do CommandLine2
17
+ .SetVar CommandLine1 Value
18
+ .SetVar CommandLine2 One or more values to increment the variable by. These can be constants or
19
+ .Do CommandLine2
20
+ .SetVar CommandLine2 substitution variables.
21
+ .Do CommandLine2
22
+
23
+ .SetVar CommandSubHeading Other
24
+ .Do CommandSubHeading
25
+ .SetVar CommandLine1 Variable _LastResult is set to '1' if a valid variable name is provided, otherwise it is set to '0'.
26
+ .Do CommandLine
27
+ .SetVar CommandLine1 The JsPdfDynamo maintained variables (those whose name starts with an underscore) can not
28
+ .Do CommandLine
29
+ .SetVar CommandLine1 be changed by this command.
30
+ .Do CommandLine
31
+ .incCurrentY %halfLineGap%
32
+ .SetVar CommandLine1 A variable can be decremented by using a negative value.
33
+ .Do CommandLine
34
+ .incCurrentY %halfLineGap%
35
+ .SetVar CommandLine1 The variable name may itself be, or contain a variable.
36
+ .Do CommandLine
37
+
38
+ .SetVar CommandSubHeading Examples
39
+ .Do CommandSubHeading
40
+ .SetVar CommandLine1 Increase the value of the variable 'LineNo' from '3' to '4':
41
+ .Do CommandLine
42
+ .incCurrentY %halfLineGap%
43
+ .SetVar CommandLine1 .SetVar LineNo 3
44
+ .Do CommandLine2
45
+ .SetVar CommandLine1 .IncVar LineNo 1
46
+ .Do CommandLine2
47
+ .incCurrentY %_FontHeight%
48
+
49
+ .SetVar CommandLine1 Decrease the value of 'Weight3' from '78.6' to '77.2':
50
+ .Do CommandLine
51
+ .incCurrentY %halfLineGap%
52
+ .SetVar CommandLine1 .SetVar index 3
53
+ .Do CommandLine2
54
+ .SetVar CommandLine1 .SetVar Weight%%%%index%%%% 78.6
55
+ .Do CommandLine2
56
+ .SetVar CommandLine1 .IncVar Weight%%%%index%%%% -1.4
57
+ .Do CommandLine2
58
+ .incCurrentY %_FontHeight%
59
+
60
+ .SetVar CommandLine1 Multiple values can be used to increase value of 'total' from 0 to 4.55
61
+ .Do CommandLine
62
+ .incCurrentY %halfLineGap%
63
+ .SetVar CommandLine1 .SetVar Total 0
64
+ .Do CommandLine2
65
+ .SetVar CommandLine1 .IncVar Total 5 -2.5 2.05
66
+ .Do CommandLine2
67
+ .incCurrentY %_FontHeight%
68
+
69
+ .SetVar CommandSubHeading See Also
70
+ .Do CommandSubHeading
71
+ .SetVar CommandLine1 CopyVar, MultVar, SetVar
72
+ .Do CommandLine2
73
+ .incCurrentY %_FontHeight%
@@ -0,0 +1,44 @@
1
+ .SetVar CommandName Include
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.
9
+ .Do CommandLine
10
+
11
+ .SetVar CommandSubHeading Syntax
12
+ .Do CommandSubHeading
13
+ .SetVar CommandLine1 .Include FileName
14
+ .Do CommandLine2
15
+
16
+ .SetVar CommandSubHeading Parameters
17
+ .Do CommandSubHeading
18
+ .SetVar CommandLine1 FileName
19
+ .SetVar CommandLine2 The path and name of the file to be included.
20
+ .Do CommandLine2
21
+
22
+ .SetVar CommandSubHeading Other
23
+ .Do CommandSubHeading
24
+ .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.
29
+ .Do CommandLine
30
+
31
+ .SetVar CommandSubHeading Examples
32
+ .Do CommandSubHeading
33
+ .SetVar CommandLine1 Include the template file StdReportLayout.txt:
34
+ .Do CommandLine
35
+ .incCurrentY %halfLineGap%
36
+ .SetVar CommandLine1 .Include .\StdReportLayout.txt
37
+ .Do CommandLine2
38
+ .incCurrentY %_FontHeight%
39
+ .SetVar CommandLine1 Include the template file specified in the 'ReportType' variable:
40
+ .Do CommandLine
41
+ .incCurrentY %halfLineGap%
42
+ .SetVar CommandLine1 .Include \tmplates\%%%%ReportType%%%%
43
+ .Do CommandLine2
44
+ .incCurrentY %_FontHeight%
@@ -0,0 +1,70 @@
1
+ .SetVar CommandName MultVar
2
+ .Do CommandHeading
3
+ .DrawText 0 %_CurrentY% Multiple the value of a variable by one or more factors.
4
+
5
+ .SetVar CommandSubHeading Syntax
6
+ .Do CommandSubHeading
7
+ .SetVar CommandLine1 .MultVar 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
+ .Do CommandLine2
15
+ .SetVar CommandLine2 but it can be, or contain substitution variables. The variable must exist.
16
+ .Do CommandLine2
17
+ .SetVar CommandLine1 Value
18
+ .SetVar CommandLine2 One or more values to multiple the variable by. These can be constants or
19
+ .Do CommandLine2
20
+ .SetVar CommandLine2 substitution variables.
21
+ .Do CommandLine2
22
+
23
+ .SetVar CommandSubHeading Other
24
+ .Do CommandSubHeading
25
+ .SetVar CommandLine1 Variable _LastResult is set to '1' if a valid variable name is provided, otherwise it is set to '0'.
26
+ .Do CommandLine
27
+ .SetVar CommandLine1 The JsPdfDynamo maintained variables (those whose name starts with an underscore) can not
28
+ .Do CommandLine
29
+ .SetVar CommandLine1 be changed by this command.
30
+ .Do CommandLine
31
+ .incCurrentY %halfLineGap%
32
+ .SetVar CommandLine1 The variable name may itself be, or contain a variable.
33
+ .Do CommandLine
34
+
35
+ .SetVar CommandSubHeading Examples
36
+ .Do CommandSubHeading
37
+ .SetVar CommandLine1 Multiple the value of the variable 'Total' by '4':
38
+ .Do CommandLine
39
+ .incCurrentY %halfLineGap%
40
+ .SetVar CommandLine1 .SetVar Total 3
41
+ .Do CommandLine2
42
+ .SetVar CommandLine1 .MultVar Total 4
43
+ .Do CommandLine2
44
+ .incCurrentY %_FontHeight%
45
+
46
+ .SetVar CommandLine1 Decrease the value of 'Weight6' by half from '78.6' to '39.3':
47
+ .Do CommandLine
48
+ .incCurrentY %halfLineGap%
49
+ .SetVar CommandLine1 .SetVar index 6
50
+ .Do CommandLine2
51
+ .SetVar CommandLine1 .SetVar Weight%%%%index%%%% 78.6
52
+ .Do CommandLine2
53
+ .SetVar CommandLine1 .MultVar Weight%%%%index%%%% 0.5
54
+ .Do CommandLine2
55
+ .incCurrentY %_FontHeight%
56
+
57
+ .SetVar CommandLine1 Multiple values can be used to increase value of 'total' from 1 to 5
58
+ .Do CommandLine
59
+ .incCurrentY %halfLineGap%
60
+ .SetVar CommandLine1 .SetVar Total 1
61
+ .Do CommandLine2
62
+ .SetVar CommandLine1 .MultVar Total 10 -0.5 -1
63
+ .Do CommandLine2
64
+ .incCurrentY %_FontHeight%
65
+
66
+ .SetVar CommandSubHeading See Also
67
+ .Do CommandSubHeading
68
+ .SetVar CommandLine1 CopyVar, IncVar, SetVar
69
+ .Do CommandLine2
70
+ .incCurrentY %_FontHeight%
@@ -0,0 +1,37 @@
1
+ .SetVar CommandName SetCurrentX
2
+ .Do CommandHeading
3
+ .DrawText 0 %_CurrentY% Set the current left position. This value can be retrieved using the system maintained
4
+ .SetVar CommandLine1 _CurrentX variable.
5
+ .Do CommandLine
6
+
7
+ .SetVar CommandSubHeading Syntax
8
+ .Do CommandSubHeading
9
+ .SetVar CommandLine1 .setCurrentX Value
10
+ .Do CommandLine2
11
+
12
+ .SetVar CommandSubHeading Parameters
13
+ .Do CommandSubHeading
14
+ .SetVar CommandLine1 Value
15
+ .SetVar CommandLine2 The value to assign to the current left position, expressed in millimeters.
16
+ .Do CommandLine2
17
+
18
+ .SetVar CommandSubHeading Examples
19
+ .Do CommandSubHeading
20
+ .SetVar CommandLine1 Set the current left position :
21
+ .Do CommandLine
22
+ .incCurrentY %halfLineGap%
23
+ .SetVar CommandLine1 .setCurrentX 15
24
+ .Do CommandLine2
25
+ .incCurrentY %_FontHeight%
26
+
27
+ .SetVar CommandLine1 Use a substitution variable to set the current left position:
28
+ .Do CommandLine
29
+ .incCurrentY %halfLineGap%
30
+ .SetVar CommandLine1 .setCurrentX %%%%myIndent%%%%
31
+ .Do CommandLine2
32
+
33
+ .SetVar CommandSubHeading See Also
34
+ .Do CommandSubHeading
35
+ .SetVar CommandLine1 incCurrentX, setCurrentY, Variables
36
+ .Do CommandLine2
37
+ .incCurrentY %_FontHeight%