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.
- package/LICENSE +8 -0
- package/README.md +93 -0
- package/dist/index.cjs +2175 -0
- package/dist/index.d.cts +370 -0
- package/dist/index.d.ts +370 -0
- package/dist/index.js +2145 -0
- package/documentation/1. Introduction/Introduction.txt +91 -0
- package/documentation/2. JsPdfDynamo/JsPdfDynamo.txt +6 -0
- package/documentation/2. JsPdfDynamo/constructor.txt +31 -0
- package/documentation/2. JsPdfDynamo/getVariable.txt +29 -0
- package/documentation/2. JsPdfDynamo/prepareWrappedString.txt +28 -0
- package/documentation/2. JsPdfDynamo/processCommands.txt +27 -0
- package/documentation/2. JsPdfDynamo/toBlob.txt +19 -0
- package/documentation/2. JsPdfDynamo/toBlobUrl.txt +36 -0
- package/documentation/3. Variables/Introduction.txt +36 -0
- package/documentation/3. Variables/SystemMaintained.txt +190 -0
- package/documentation/4. Commands/AddBookmark.txt +47 -0
- package/documentation/4. Commands/AddImageFromFile.txt +59 -0
- package/documentation/4. Commands/AddImageFromUrl.txt +63 -0
- package/documentation/4. Commands/AddPage.txt +40 -0
- package/documentation/4. Commands/CheckPage.txt +52 -0
- package/documentation/4. Commands/CopyVar.txt +52 -0
- package/documentation/4. Commands/Do.txt +40 -0
- package/documentation/4. Commands/DoRepeat.txt +51 -0
- package/documentation/4. Commands/DrawBox.txt +67 -0
- package/documentation/4. Commands/DrawDebugGrid.txt +41 -0
- package/documentation/4. Commands/DrawImage.txt +92 -0
- package/documentation/4. Commands/DrawLine.txt +62 -0
- package/documentation/4. Commands/DrawText.txt +61 -0
- package/documentation/4. Commands/DrawTextBox.txt +99 -0
- package/documentation/4. Commands/DrawTextWrapped.txt +65 -0
- package/documentation/4. Commands/ForEachPage.txt +44 -0
- package/documentation/4. Commands/GetEnvVar.txt +56 -0
- package/documentation/4. Commands/IfBlank.txt +63 -0
- package/documentation/4. Commands/IfGt.txt +58 -0
- package/documentation/4. Commands/IfNotBlank.txt +60 -0
- package/documentation/4. Commands/IncCurrentX.txt +52 -0
- package/documentation/4. Commands/IncCurrentY.txt +50 -0
- package/documentation/4. Commands/IncVar.txt +73 -0
- package/documentation/4. Commands/Include.txt +44 -0
- package/documentation/4. Commands/MultVar.txt +70 -0
- package/documentation/4. Commands/SetCurrentX.txt +37 -0
- package/documentation/4. Commands/SetCurrentY.txt +37 -0
- package/documentation/4. Commands/SetDocumentInfo.txt +35 -0
- package/documentation/4. Commands/SetFillColour.txt +58 -0
- package/documentation/4. Commands/SetFontName.txt +4 -0
- package/documentation/4. Commands/SetFontSize.txt +22 -0
- package/documentation/4. Commands/SetFontStyle.txt +55 -0
- package/documentation/4. Commands/SetLineColour.txt +58 -0
- package/documentation/4. Commands/SetLineWidth.txt +42 -0
- package/documentation/4. Commands/SetMargin.txt +69 -0
- package/documentation/4. Commands/SetPageOrientation.txt +42 -0
- package/documentation/4. Commands/SetVar.txt +69 -0
- package/documentation/5. Other Definitions/jsPdfOptions.txt +56 -0
- package/documentation/5. Other Definitions/logger.txt +35 -0
- package/documentation/5. Other Definitions/pageSizes.txt +41 -0
- package/documentation/6. Other/PossibleEnhancements.txt +63 -0
- package/documentation/6. Other/To Be Documented.txt +50 -0
- package/documentation/Documentation.pdf +9859 -0
- package/documentation/README.md +7 -0
- package/documentation/documentation.txt +266 -0
- package/documentation/gendoc.spec.ts +22 -0
- package/examples/1.Simple/simple.pdf +247 -0
- package/examples/1.Simple/template.txt +21 -0
- package/examples/examples.spec.ts +26 -0
- package/package.json +58 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.SetVar CommandName SetCurrentY
|
|
2
|
+
.Do CommandHeading
|
|
3
|
+
.DrawText 0 %_CurrentY% Set the current top (vertical) position. This value can be retrieved using the system maintained
|
|
4
|
+
.SetVar CommandLine1 _CurrentY variable.
|
|
5
|
+
.Do CommandLine
|
|
6
|
+
|
|
7
|
+
.SetVar CommandSubHeading Syntax
|
|
8
|
+
.Do CommandSubHeading
|
|
9
|
+
.SetVar CommandLine1 .setCurrentY 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 top position, expressed in millimeters.
|
|
16
|
+
.Do CommandLine2
|
|
17
|
+
|
|
18
|
+
.SetVar CommandSubHeading Examples
|
|
19
|
+
.Do CommandSubHeading
|
|
20
|
+
.SetVar CommandLine1 Set the current top position :
|
|
21
|
+
.Do CommandLine
|
|
22
|
+
.incCurrentY %halfLineGap%
|
|
23
|
+
.SetVar CommandLine1 .setCurrentY 14
|
|
24
|
+
.Do CommandLine2
|
|
25
|
+
.incCurrentY %_FontHeight%
|
|
26
|
+
|
|
27
|
+
.SetVar CommandLine1 Use a substitution variable to set the current top position:
|
|
28
|
+
.Do CommandLine
|
|
29
|
+
.incCurrentY %halfLineGap%
|
|
30
|
+
.SetVar CommandLine1 .setCurrentY %%%%previousSavedTop%%%%
|
|
31
|
+
.Do CommandLine2
|
|
32
|
+
|
|
33
|
+
.SetVar CommandSubHeading See Also
|
|
34
|
+
.Do CommandSubHeading
|
|
35
|
+
.SetVar CommandLine1 incCurrentY, setCurrentX, Variables
|
|
36
|
+
.Do CommandLine2
|
|
37
|
+
.incCurrentY %_FontHeight%
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.SetVar CommandName SetDocumentInfo
|
|
2
|
+
.Do CommandHeading
|
|
3
|
+
.DrawText 0 %_CurrentY% Set the value of one of the PDF properties
|
|
4
|
+
|
|
5
|
+
.SetVar CommandSubHeading Syntax
|
|
6
|
+
.Do CommandSubHeading
|
|
7
|
+
.SetVar CommandLine1 .SetDocumentInfo Property Value
|
|
8
|
+
.Do CommandLine2
|
|
9
|
+
|
|
10
|
+
.SetVar CommandSubHeading Parameters
|
|
11
|
+
.Do CommandSubHeading
|
|
12
|
+
.SetVar CommandLine1 Property
|
|
13
|
+
.SetVar CommandLine2 One of the following values: Application, Author, Creator, CreationDate, Keywords,
|
|
14
|
+
.Do CommandLine2
|
|
15
|
+
.SetVar CommandLine2 ModDate, Producer, Subject or Title.
|
|
16
|
+
.Do CommandLine2
|
|
17
|
+
.SetVar CommandLine1 Value
|
|
18
|
+
.SetVar CommandLine2 The value to set the property to. For CreationDate and ModDate this must
|
|
19
|
+
.Do CommandLine2
|
|
20
|
+
.SetVar CommandLine2 either be in the format of yyyy-mm-dd or blank.
|
|
21
|
+
.Do CommandLine2
|
|
22
|
+
|
|
23
|
+
.SetVar CommandSubHeading Other
|
|
24
|
+
.Do CommandSubHeading
|
|
25
|
+
.SetVar CommandLine1 Variable _LastResult is set to '1' if a valid property is specified, otherwise it is set to '0'.
|
|
26
|
+
.Do CommandLine
|
|
27
|
+
|
|
28
|
+
.SetVar CommandSubHeading Examples
|
|
29
|
+
.Do CommandSubHeading
|
|
30
|
+
.SetVar CommandLine1 .SetDocumentInfo Author 12th Level
|
|
31
|
+
.Do CommandLine2
|
|
32
|
+
.incCurrentY %halfLineGap%
|
|
33
|
+
.SetVar CommandLine1 .SetDocumentInfo Title Weekly Status Report %%%%ReportDate%%%%
|
|
34
|
+
.Do CommandLine2
|
|
35
|
+
.incCurrentY %_FontHeight%
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.SetVar CommandName SetFillColour
|
|
2
|
+
.Do CommandHeading
|
|
3
|
+
.DrawText 0 %_CurrentY% Set the fill colour of subsequent boxes drawn with the DrawBox command.
|
|
4
|
+
|
|
5
|
+
.SetVar CommandSubHeading Syntax
|
|
6
|
+
.Do CommandSubHeading
|
|
7
|
+
.SetVar CommandLine1 .SetFillColor Red Green Blue
|
|
8
|
+
.Do CommandLine2
|
|
9
|
+
|
|
10
|
+
.SetVar CommandSubHeading Parameters
|
|
11
|
+
.Do CommandSubHeading
|
|
12
|
+
.SetVar CommandLine1 Red
|
|
13
|
+
.SetVar CommandLine2 The amount of red in the colour, represented as a number in the range
|
|
14
|
+
.Do CommandLine2
|
|
15
|
+
.SetVar CommandLine2 of 0 to 255
|
|
16
|
+
.Do CommandLine2
|
|
17
|
+
.SetVar CommandLine1 Green
|
|
18
|
+
.SetVar CommandLine2 The amount of green in the colour, represented as a number in the range
|
|
19
|
+
.Do CommandLine2
|
|
20
|
+
.SetVar CommandLine2 of 0 to 255
|
|
21
|
+
.Do CommandLine2
|
|
22
|
+
.SetVar CommandLine1 Blue
|
|
23
|
+
.SetVar CommandLine2 The amount of blue in the colour, represented as a number in the range
|
|
24
|
+
.Do CommandLine2
|
|
25
|
+
.SetVar CommandLine2 of 0 to 255
|
|
26
|
+
.Do CommandLine2
|
|
27
|
+
|
|
28
|
+
.SetVar CommandSubHeading Other
|
|
29
|
+
.Do CommandSubHeading
|
|
30
|
+
.SetVar CommandLine1 Colours are specified in the RGB style using three numbers in the range of 0 to 255,
|
|
31
|
+
.Do CommandLine
|
|
32
|
+
.SetVar CommandLine1 representing the amount of red, green and blue in the final colour.
|
|
33
|
+
.Do CommandLine
|
|
34
|
+
.incCurrentY %halfLineGap%
|
|
35
|
+
.SetVar CommandLine1 The variable _LastResult is set to '1' by this command.
|
|
36
|
+
.Do CommandLine
|
|
37
|
+
|
|
38
|
+
.SetVar CommandSubHeading Examples
|
|
39
|
+
.Do CommandSubHeading
|
|
40
|
+
.SetVar CommandLine1 Set the colour of subsequent filled boxes to be grey:
|
|
41
|
+
.Do CommandLine
|
|
42
|
+
.incCurrentY %halfLineGap%
|
|
43
|
+
.SetVar CommandLine1 .SetLineColour 200 200 200
|
|
44
|
+
.Do CommandLine2
|
|
45
|
+
|
|
46
|
+
.incCurrentY %_FontHeight%
|
|
47
|
+
.SetVar CommandLine1 Set the colour of subsequent filled boxes to be green:
|
|
48
|
+
.Do CommandLine
|
|
49
|
+
.incCurrentY %halfLineGap%
|
|
50
|
+
.SetVar CommandLine1 .SetLineColour 0 180 0
|
|
51
|
+
.Do CommandLine2
|
|
52
|
+
|
|
53
|
+
.SetVar CommandSubHeading See Also
|
|
54
|
+
.Do CommandSubHeading
|
|
55
|
+
.SetVar CommandLine1 DrawBox, SetLineColour
|
|
56
|
+
.Do CommandLine
|
|
57
|
+
|
|
58
|
+
.incCurrentY %_FontHeight%
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.SetVar CommandName SetFontSize
|
|
2
|
+
.Do CommandHeading
|
|
3
|
+
.SetVar CommandLine1 To be documented.
|
|
4
|
+
.Do CommandLine
|
|
5
|
+
|
|
6
|
+
.incCurrentY %_FontHeight%
|
|
7
|
+
.SetVar CommandLine1 Set a variable named 'BoldText' and then use this variable to set the emphasis of subsequent
|
|
8
|
+
.Do CommandLine
|
|
9
|
+
.SetVar CommandLine1 text to be bold:
|
|
10
|
+
.Do CommandLine
|
|
11
|
+
.incCurrentY %halfLineGap%
|
|
12
|
+
.SetVar CommandLine1 .SetVar BoldText 1
|
|
13
|
+
.Do CommandLine2
|
|
14
|
+
.SetVar CommandLine1 .SetFontStyle %%%%BoldText%%%%
|
|
15
|
+
.Do CommandLine2
|
|
16
|
+
|
|
17
|
+
.SetVar CommandSubHeading See Also
|
|
18
|
+
.Do CommandSubHeading
|
|
19
|
+
.SetVar CommandLine1 DrawTextBox, DrawText, SetFontType, SetFontSize, SetTextColour
|
|
20
|
+
.Do CommandLine
|
|
21
|
+
|
|
22
|
+
.incCurrentY %_FontHeight%
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
.SetVar CommandName SetFontStyle
|
|
2
|
+
.Do CommandHeading
|
|
3
|
+
.DrawText 0 %_CurrentY% Apply the typographical emphasis for the current font. For example, normal, bold or italic.
|
|
4
|
+
.SetVar CommandLine1 Subsequent output of text will continue to use this emphasis until changed by another
|
|
5
|
+
.Do CommandLine
|
|
6
|
+
.SetVar CommandLine1 SetFontStyle command.
|
|
7
|
+
.Do CommandLine
|
|
8
|
+
|
|
9
|
+
.SetVar CommandSubHeading Syntax
|
|
10
|
+
.Do CommandSubHeading
|
|
11
|
+
.SetVar CommandLine1 .SetFontStyle fontStyle
|
|
12
|
+
.Do CommandLine2
|
|
13
|
+
|
|
14
|
+
.SetVar CommandSubHeading Parameters
|
|
15
|
+
.Do CommandSubHeading
|
|
16
|
+
.SetVar CommandLine1 fontStyle
|
|
17
|
+
.SetVar CommandLine2 The typographical emphasis to apply:
|
|
18
|
+
.Do CommandLine2
|
|
19
|
+
.incCurrentY %halfLineGap%
|
|
20
|
+
.SetVar CommandLine2 Normal - Normal text (no typographical emphasis)
|
|
21
|
+
.Do CommandLine2
|
|
22
|
+
|
|
23
|
+
.SetVar CommandLine2 Bold - Bold text
|
|
24
|
+
.SetFontStyle Bold
|
|
25
|
+
.Do CommandLine2
|
|
26
|
+
|
|
27
|
+
.SetVar CommandLine2 Italic - Italic text
|
|
28
|
+
.SetFontStyle Italic
|
|
29
|
+
.Do CommandLine2
|
|
30
|
+
|
|
31
|
+
.SetVar CommandLine2 BoldItalic - Bold and italic text
|
|
32
|
+
.SetFontStyle BoldItalic
|
|
33
|
+
.Do CommandLine2
|
|
34
|
+
|
|
35
|
+
.SetFontStyle Normal
|
|
36
|
+
|
|
37
|
+
.SetVar CommandSubHeading Other
|
|
38
|
+
.Do CommandSubHeading
|
|
39
|
+
.SetVar CommandLine1 The font style name is not case sensitive so can be either upper, lower
|
|
40
|
+
.Do CommandLine
|
|
41
|
+
.SetVar CommandLine1 or mixed case.
|
|
42
|
+
.Do CommandLine
|
|
43
|
+
.incCurrentY %halfLineGap%
|
|
44
|
+
.SetVar CommandLine1 If a valid font style is provided the variable _LastResult is set to '1' otherwise the current
|
|
45
|
+
.Do CommandLine
|
|
46
|
+
.SetVar CommandLine1 typographical emphasis is unchanged and _LastResult is set to '0'.
|
|
47
|
+
.Do CommandLine
|
|
48
|
+
|
|
49
|
+
.SetVar CommandSubHeading Examples
|
|
50
|
+
.Do CommandSubHeading
|
|
51
|
+
.SetVar CommandLine1 Set the emphasis of subsequent text to be italic:
|
|
52
|
+
.Do CommandLine
|
|
53
|
+
.incCurrentY %halfLineGap%
|
|
54
|
+
.SetVar CommandLine1 .SetFontStyle 2
|
|
55
|
+
.Do CommandLine2
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.SetVar CommandName SetLineColour
|
|
2
|
+
.Do CommandHeading
|
|
3
|
+
.DrawText 0 %_CurrentY Set the colour of subsequent lines drawn with the DrawBox and DrawLine commands.
|
|
4
|
+
|
|
5
|
+
.SetVar CommandSubHeading Syntax
|
|
6
|
+
.Do CommandSubHeading
|
|
7
|
+
.SetVar CommandLine1 .SetLineColor Red Green Blue
|
|
8
|
+
.Do CommandLine2
|
|
9
|
+
|
|
10
|
+
.SetVar CommandSubHeading Parameters
|
|
11
|
+
.Do CommandSubHeading
|
|
12
|
+
.SetVar CommandLine1 Red
|
|
13
|
+
.SetVar CommandLine2 The amount of red in the colour, represented as a number in the range
|
|
14
|
+
.Do CommandLine2
|
|
15
|
+
.SetVar CommandLine2 of 0 to 255
|
|
16
|
+
.Do CommandLine2
|
|
17
|
+
.SetVar CommandLine1 Green
|
|
18
|
+
.SetVar CommandLine2 The amount of green in the colour, represented as a number in the range
|
|
19
|
+
.Do CommandLine2
|
|
20
|
+
.SetVar CommandLine2 of 0 to 255
|
|
21
|
+
.Do CommandLine2
|
|
22
|
+
.SetVar CommandLine1 Blue
|
|
23
|
+
.SetVar CommandLine2 The amount of blue in the colour, represented as a number in the range
|
|
24
|
+
.Do CommandLine2
|
|
25
|
+
.SetVar CommandLine2 of 0 to 255
|
|
26
|
+
.Do CommandLine2
|
|
27
|
+
|
|
28
|
+
.SetVar CommandSubHeading Other
|
|
29
|
+
.Do CommandSubHeading
|
|
30
|
+
.SetVar CommandLine1 Colours are specified in the RGB style using three numbers in the range of 0 to 255,
|
|
31
|
+
.Do CommandLine
|
|
32
|
+
.SetVar CommandLine1 representing the amount of red, green and blue in the final colour.
|
|
33
|
+
.Do CommandLine
|
|
34
|
+
.incCurrentY %halfLineGap%
|
|
35
|
+
.SetVar CommandLine1 The variable _LastResult is set to '1' by this command.
|
|
36
|
+
.Do CommandLine
|
|
37
|
+
|
|
38
|
+
.SetVar CommandSubHeading Examples
|
|
39
|
+
.Do CommandSubHeading
|
|
40
|
+
.SetVar CommandLine1 Set the colour of subsequent lines to be black:
|
|
41
|
+
.Do CommandLine
|
|
42
|
+
.incCurrentY %halfLineGap%
|
|
43
|
+
.SetVar CommandLine1 .SetLineColour 0 0 0
|
|
44
|
+
.Do CommandLine2
|
|
45
|
+
|
|
46
|
+
.incCurrentY %_FontHeight%
|
|
47
|
+
.SetVar CommandLine1 Set the colour of subsequent lines to be blue:
|
|
48
|
+
.Do CommandLine
|
|
49
|
+
.incCurrentY %halfLineGap%
|
|
50
|
+
.SetVar CommandLine1 .SetLineColour 0 0 200
|
|
51
|
+
.Do CommandLine2
|
|
52
|
+
|
|
53
|
+
.SetVar CommandSubHeading See Also
|
|
54
|
+
.Do CommandSubHeading
|
|
55
|
+
.SetVar CommandLine1 DrawBox, DrawLine, SetFillColour, SetLineWidth
|
|
56
|
+
.Do CommandLine
|
|
57
|
+
|
|
58
|
+
.incCurrentY %_FontHeight%
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.SetVar CommandName SetLineWidth
|
|
2
|
+
.Do CommandHeading
|
|
3
|
+
.DrawText 0 %_CurrentY% Set the width of subsequent lines drawn with the DrawBox and DrawLine commands.
|
|
4
|
+
|
|
5
|
+
.SetVar CommandSubHeading Syntax
|
|
6
|
+
.Do CommandSubHeading
|
|
7
|
+
.SetVar CommandLine1 .SetLineWidth Width
|
|
8
|
+
.Do CommandLine2
|
|
9
|
+
|
|
10
|
+
.SetVar CommandSubHeading Parameters
|
|
11
|
+
.Do CommandSubHeading
|
|
12
|
+
.SetVar CommandLine1 Width
|
|
13
|
+
.SetVar CommandLine2 The width of the line(s) to be drawn in millimeters, as a floating point number
|
|
14
|
+
.Do CommandLine2
|
|
15
|
+
|
|
16
|
+
.SetVar CommandSubHeading Other
|
|
17
|
+
.Do CommandSubHeading
|
|
18
|
+
.SetVar CommandLine1 Variable _LastResult is set to '1'. The variable _CurrentLineWidth is set to the width.
|
|
19
|
+
.Do CommandLine
|
|
20
|
+
|
|
21
|
+
.SetVar CommandSubHeading Examples
|
|
22
|
+
.Do CommandSubHeading
|
|
23
|
+
.SetVar CommandLine1 Set the width of subsequent lines to be 0.5mm:
|
|
24
|
+
.Do CommandLine
|
|
25
|
+
.incCurrentY %halfLineGap%
|
|
26
|
+
.SetVar CommandLine1 .SetLineWidth 0.5
|
|
27
|
+
.Do CommandLine2
|
|
28
|
+
|
|
29
|
+
.incCurrentY %_FontHeight%
|
|
30
|
+
.SetVar CommandLine1 Set the width of subsequent lines to be 1mm:
|
|
31
|
+
.Do CommandLine
|
|
32
|
+
.incCurrentY %halfLineGap%
|
|
33
|
+
.SetVar CommandLine1 .SetLineWidth 1
|
|
34
|
+
.Do CommandLine2
|
|
35
|
+
.incCurrentY %_FontHeight%
|
|
36
|
+
|
|
37
|
+
.SetVar CommandSubHeading See Also
|
|
38
|
+
.Do CommandSubHeading
|
|
39
|
+
.SetVar CommandLine1 DrawBox, DrawLine, SetFillColour, SetLineColour
|
|
40
|
+
.Do CommandLine
|
|
41
|
+
|
|
42
|
+
.incCurrentY %_FontHeight%
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
.SetVar CommandName SetMargin
|
|
2
|
+
.Do CommandHeading
|
|
3
|
+
.DrawText 0 %_CurrentY% Set the page margins. The margins will remain in effect until changed by a subsequent
|
|
4
|
+
.SetVar CommandLine1 SetMargin command. It is not unusual to change left and right margins multiple times
|
|
5
|
+
.Do CommandLine
|
|
6
|
+
.SetVar CommandLine1 on the same page.
|
|
7
|
+
.Do CommandLine
|
|
8
|
+
|
|
9
|
+
.SetVar CommandSubHeading Syntax
|
|
10
|
+
.Do CommandSubHeading
|
|
11
|
+
.SetVar CommandLine1 .SetMargin Side Size
|
|
12
|
+
.Do CommandLine2
|
|
13
|
+
|
|
14
|
+
.SetVar CommandSubHeading Parameters
|
|
15
|
+
.Do CommandSubHeading
|
|
16
|
+
.SetVar CommandLine1 Side
|
|
17
|
+
.SetVar CommandLine2 Only the first letter is used to determine the side(s). It is not case sensitive.
|
|
18
|
+
.Do CommandLine2
|
|
19
|
+
.incCurrentY %halfLineGap%
|
|
20
|
+
.SetVar CommandLine2 L or Left - Margin from the left side of the page
|
|
21
|
+
.Do CommandLine2
|
|
22
|
+
.SetVar CommandLine2 R or Right - Margin from the right side of the page
|
|
23
|
+
.Do CommandLine2
|
|
24
|
+
.SetVar CommandLine2 T or Top - Margin from the top of the page
|
|
25
|
+
.Do CommandLine2
|
|
26
|
+
.SetVar CommandLine2 B or Bottom - Margin from the bottom of the page
|
|
27
|
+
.Do CommandLine2
|
|
28
|
+
.SetVar CommandLine2 A or All - All margins, top, bottom, left and right
|
|
29
|
+
.Do CommandLine2
|
|
30
|
+
.SetVar CommandLine2 H or Horizontal - Both horizontal margins, left and right
|
|
31
|
+
.Do CommandLine2
|
|
32
|
+
.SetVar CommandLine2 V or Vertical - Both vertical margins, top and bottom
|
|
33
|
+
.Do CommandLine2
|
|
34
|
+
.SetVar CommandLine1 Size
|
|
35
|
+
.SetVar CommandLine2 The size of the margin in millimeters.
|
|
36
|
+
.Do CommandLine2
|
|
37
|
+
|
|
38
|
+
.SetVar CommandSubHeading Other
|
|
39
|
+
.Do CommandSubHeading
|
|
40
|
+
.SetVar CommandLine1 Variable _LastResult is set to '1' if a valid margin is provided, otherwise it is set to '0'.
|
|
41
|
+
.Do CommandLine
|
|
42
|
+
.incCurrentY %halfLineGap%
|
|
43
|
+
.SetVar CommandLine1 The appropriate variables _MarginLeft, _MarginRight, _MarginTop and _MarginBottom are
|
|
44
|
+
.Do CommandLine
|
|
45
|
+
.SetVar CommandLine1 set, while the _PageWidth and _Page_Height variables are re-calculated based on the
|
|
46
|
+
.Do CommandLine
|
|
47
|
+
.SetVar CommandLine1 current page size and margins.
|
|
48
|
+
.Do CommandLine
|
|
49
|
+
.incCurrentY %halfLineGap%
|
|
50
|
+
.SetVar CommandLine1 Note that changing the margins does not change the values of the current position variables,
|
|
51
|
+
.Do CommandLine
|
|
52
|
+
.SetVar CommandLine1 _CurrentY and _CurrentX, which are always relative to the current margins.
|
|
53
|
+
.Do CommandLine
|
|
54
|
+
|
|
55
|
+
.SetVar CommandSubHeading Examples
|
|
56
|
+
.Do CommandSubHeading
|
|
57
|
+
.SetVar CommandLine1 Set all margins (from now on) to 10mm:
|
|
58
|
+
.Do CommandLine
|
|
59
|
+
.incCurrentY %halfLineGap%
|
|
60
|
+
.SetVar CommandLine1 .SetMargin All 10
|
|
61
|
+
.Do CommandLine2
|
|
62
|
+
|
|
63
|
+
.incCurrentY %_FontHeight%
|
|
64
|
+
.SetVar CommandLine1 Set the left and right margins to 15mm:
|
|
65
|
+
.Do CommandLine
|
|
66
|
+
.incCurrentY %halfLineGap%
|
|
67
|
+
.SetVar CommandLine1 .SetMargin h 15
|
|
68
|
+
.Do CommandLine2
|
|
69
|
+
.incCurrentY %_FontHeight%
|
|
@@ -0,0 +1,42 @@
|
|
|
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%
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
.SetVar CommandName SetVar
|
|
2
|
+
.Do CommandHeading
|
|
3
|
+
.DrawText 0 %_CurrentY% Set the value of a variable. Note that all variables are stored as strings.
|
|
4
|
+
|
|
5
|
+
.SetVar CommandSubHeading Syntax
|
|
6
|
+
.Do CommandSubHeading
|
|
7
|
+
.SetVar CommandLine1 .SetVar Variable Value
|
|
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.
|
|
14
|
+
.Do CommandLine2
|
|
15
|
+
.SetVar CommandLine1 Value
|
|
16
|
+
.SetVar CommandLine2 The value to assign to the variable. (Optional)
|
|
17
|
+
.Do CommandLine2
|
|
18
|
+
|
|
19
|
+
.SetVar CommandSubHeading Other
|
|
20
|
+
.Do CommandSubHeading
|
|
21
|
+
.SetVar CommandLine1 Variable _LastResult is set to '1' if a valid variable name is provided, otherwise it is set to '0'.
|
|
22
|
+
.Do CommandLine
|
|
23
|
+
.SetVar CommandLine1 The JsPdfDynamo maintained variables (those whose name starts with an underscore) can
|
|
24
|
+
.Do CommandLine
|
|
25
|
+
.SetVar CommandLine1 not be changed using this command.
|
|
26
|
+
.Do CommandLine
|
|
27
|
+
.incCurrentY %halfLineGap%
|
|
28
|
+
.SetVar CommandLine1 To set a variable to blank, omit the value parameter.
|
|
29
|
+
.Do CommandLine
|
|
30
|
+
.incCurrentY %halfLineGap%
|
|
31
|
+
.SetVar CommandLine1 The variable name may itself be, or contain a variable.
|
|
32
|
+
.Do CommandLine
|
|
33
|
+
|
|
34
|
+
.SetVar CommandSubHeading Examples
|
|
35
|
+
.Do CommandSubHeading
|
|
36
|
+
.SetVar CommandLine1 Set the variable 'Heading' to 'A mighty Good Heading':
|
|
37
|
+
.Do CommandLine
|
|
38
|
+
.incCurrentY %halfLineGap%
|
|
39
|
+
.SetVar CommandLine1 .SetVar Heading A mighty Good Heading
|
|
40
|
+
.Do CommandLine2
|
|
41
|
+
.incCurrentY %_FontHeight%
|
|
42
|
+
|
|
43
|
+
.SetVar CommandLine1 Save the current vertical position on the page in the variable 'top':
|
|
44
|
+
.Do CommandLine
|
|
45
|
+
.incCurrentY %halfLineGap%
|
|
46
|
+
.SetVar CommandLine1 .SetVar Top %%%%_CurrentY%%%%
|
|
47
|
+
.Do CommandLine2
|
|
48
|
+
.incCurrentY %_FontHeight%
|
|
49
|
+
|
|
50
|
+
.SetVar CommandLine1 Set the variable 'Index' to '3':
|
|
51
|
+
.Do CommandLine
|
|
52
|
+
.incCurrentY %halfLineGap%
|
|
53
|
+
.SetVar CommandLine1 .SetVar Index 3
|
|
54
|
+
.Do CommandLine2
|
|
55
|
+
.incCurrentY %_FontHeight%
|
|
56
|
+
|
|
57
|
+
.SetVar CommandLine1 Set the variable 'Item7' to the current value of the variable 'Description', given that the
|
|
58
|
+
.Do CommandLine
|
|
59
|
+
.SetVar CommandLine1 variable 'CurrentItem' has the value of '7':
|
|
60
|
+
.Do CommandLine
|
|
61
|
+
.incCurrentY %halfLineGap%
|
|
62
|
+
.SetVar CommandLine1 .SetVar Item%%%%CurrentItem%%%% %%%%Description%%%%
|
|
63
|
+
.Do CommandLine2
|
|
64
|
+
|
|
65
|
+
.SetVar CommandSubHeading See Also
|
|
66
|
+
.Do CommandSubHeading
|
|
67
|
+
.SetVar CommandLine1 CopyVar, IncVar, MultVar
|
|
68
|
+
.Do CommandLine2
|
|
69
|
+
.incCurrentY %_FontHeight%
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.SetVar CommandName JsPdfOptions
|
|
2
|
+
.Do CommandHeading
|
|
3
|
+
.SetVar text This object may be passed to the JsPdfDynamo constructor and can contain zero or more of the following properties:
|
|
4
|
+
.DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
|
|
5
|
+
|
|
6
|
+
.SetVar CommandSubHeading Properties
|
|
7
|
+
.Do CommandSubHeading
|
|
8
|
+
.SetVar CommandLine1 pageSize
|
|
9
|
+
.SetVar CommandLine2 A string containing one of the supported page sizes. (Refer to the section below.)
|
|
10
|
+
.Do CommandLine2
|
|
11
|
+
.SetVar CommandLine1 orientation
|
|
12
|
+
.SetVar CommandLine2 A string containing one of the valid orientation values. The first page
|
|
13
|
+
.SetVar CommandLine2 %CommandLine2% will have this orientation.
|
|
14
|
+
.Do CommandLine2
|
|
15
|
+
.SetVar CommandLine3 - 'portrait' or 'p'
|
|
16
|
+
.Do CommandLine2
|
|
17
|
+
.SetVar CommandLine3 - 'landscape' or 'l'
|
|
18
|
+
.Do CommandLine2
|
|
19
|
+
.SetVar CommandLine1 unit
|
|
20
|
+
.SetVar CommandLine2 A string containing one of the valid unit of measure values:
|
|
21
|
+
.Do CommandLine2
|
|
22
|
+
.SetVar CommandLine3 - 'mm' for metric millimeters
|
|
23
|
+
.Do CommandLine2
|
|
24
|
+
.SetVar CommandLine3 - 'in' for imperial inches
|
|
25
|
+
.Do CommandLine2
|
|
26
|
+
.SetVar CommandLine3 - 'pt' for points, based on 96 points per inch.
|
|
27
|
+
.Do CommandLine2
|
|
28
|
+
.SetVar CommandLine1 margins
|
|
29
|
+
.SetVar CommandLine2 An object containing zero or more of the following numeric values which will
|
|
30
|
+
.SetVar CommandLine2 %CommandLine2% initialise the margins. These values are measurements in the given unit of measure.
|
|
31
|
+
.Do CommandLine2
|
|
32
|
+
.SetVar CommandLine3 - 'top'
|
|
33
|
+
.Do CommandLine2
|
|
34
|
+
.SetVar CommandLine3 - 'bottom'
|
|
35
|
+
.Do CommandLine2
|
|
36
|
+
.SetVar CommandLine3 - 'left'
|
|
37
|
+
.Do CommandLine2
|
|
38
|
+
.SetVar CommandLine3 - 'right'
|
|
39
|
+
.Do CommandLine2
|
|
40
|
+
|
|
41
|
+
.SetVar CommandSubHeading Examples
|
|
42
|
+
.Do CommandSubHeading
|
|
43
|
+
.SetVar CommandLine1 let options = {
|
|
44
|
+
.SetVar CommandLine2 pageSize: "letter",
|
|
45
|
+
.Do CommandLine2
|
|
46
|
+
.SetVar CommandLine2 orientation: "portrait"}
|
|
47
|
+
.Do CommandLine2
|
|
48
|
+
.incCurrentY %halfLineGap%
|
|
49
|
+
.SetVar CommandLine1 let options = {
|
|
50
|
+
.SetVar CommandLine2 pageSize: "a3",
|
|
51
|
+
.Do CommandLine2
|
|
52
|
+
.SetVar CommandLine2 margins: { top: 10, bottom: 15, left: 10, right: 10 },
|
|
53
|
+
.Do CommandLine2
|
|
54
|
+
.SetVar CommandLine2 orientation: "l"}
|
|
55
|
+
.Do CommandLine2
|
|
56
|
+
.incCurrentY %_FontHeight%
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.SetVar CommandName Logger Object
|
|
2
|
+
.Do CommandHeading
|
|
3
|
+
.SetVar text If a logger object is passed to the JsPdfDynamo constructor, it should implement the following methods:
|
|
4
|
+
.DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
|
|
5
|
+
|
|
6
|
+
.SetVar CommandSubHeading Required Methods
|
|
7
|
+
.Do CommandSubHeading
|
|
8
|
+
.SetVar CommandLine1 Each of these methods should require at least one parameter followed by
|
|
9
|
+
.SetVar CommandLine1 %CommandLine1% or more optional arguments.
|
|
10
|
+
.DrawTextWrapped 0 %_CurrentY% %_pageWidth% CommandCheckPage %CommandLine1%
|
|
11
|
+
|
|
12
|
+
.SetVar CommandLine1 trace
|
|
13
|
+
.SetVar CommandLine2 Handle the output of the given trace message and optional arguments.
|
|
14
|
+
.Do CommandLine2
|
|
15
|
+
.SetVar CommandLine1 debug
|
|
16
|
+
.SetVar CommandLine2 Handle the output of the given debug message and optional arguments.
|
|
17
|
+
.Do CommandLine2
|
|
18
|
+
.SetVar CommandLine1 info
|
|
19
|
+
.SetVar CommandLine2 Handle the output of the given informational message and optional arguments.
|
|
20
|
+
.Do CommandLine2
|
|
21
|
+
.SetVar CommandLine1 warn
|
|
22
|
+
.SetVar CommandLine2 Handle the output of the given warning message and optional arguments.
|
|
23
|
+
.Do CommandLine2
|
|
24
|
+
.SetVar CommandLine1 error
|
|
25
|
+
.SetVar CommandLine2 Handle the output of the given error message and optional arguments.
|
|
26
|
+
.Do CommandLine2
|
|
27
|
+
|
|
28
|
+
.SetVar CommandSubHeading Optional Methods
|
|
29
|
+
.Do CommandSubHeading
|
|
30
|
+
.SetVar CommandLine1 logLevel(level)
|
|
31
|
+
.SetVar CommandLine2 Configure the logger so that it only actions messages that are at this, or a
|
|
32
|
+
.SetVar CommandLine2 %CommandLine2% higher logging level.
|
|
33
|
+
.Do CommandLine2
|
|
34
|
+
|
|
35
|
+
.incCurrentY %_FontHeight%
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.SetVar CommandName Supported Page Sizes
|
|
2
|
+
.Do CommandHeading
|
|
3
|
+
.SetVar text JsPdfDynamo implements all page sizes implemented by jsPDF with the exception of custom
|
|
4
|
+
.SetVar text %text% page sizes. These page sizes are described below.
|
|
5
|
+
.DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
|
|
6
|
+
.incCurrentY %HalfFontHeight%
|
|
7
|
+
|
|
8
|
+
.SetVar CommandSubHeading ISO 216 & ISO 269 (Metric)
|
|
9
|
+
.Do CommandSubHeading
|
|
10
|
+
.SetVar CommandLine1c %CommandLine2% - a0 to a10
|
|
11
|
+
.Do CommandLine2
|
|
12
|
+
.SetVar CommandLine1c %CommandLine2% - b0 to b10
|
|
13
|
+
.Do CommandLine2
|
|
14
|
+
.SetVar CommandLine1c %CommandLine2% - c0 to c10
|
|
15
|
+
.Do CommandLine2
|
|
16
|
+
|
|
17
|
+
.SetVar CommandSubHeading Other
|
|
18
|
+
.Do CommandSubHeading
|
|
19
|
+
.SetVar CommandLine1c %CommandLine2% - Letter
|
|
20
|
+
.Do CommandLine2
|
|
21
|
+
.SetVar CommandLine1c %CommandLine2% - Ledger
|
|
22
|
+
.Do CommandLine2
|
|
23
|
+
.SetVar CommandLine1c %CommandLine2% - Legal
|
|
24
|
+
.Do CommandLine2
|
|
25
|
+
.SetVar CommandLine1c %CommandLine2% - Government-letter
|
|
26
|
+
.Do CommandLine2
|
|
27
|
+
.SetVar CommandLine1c %CommandLine2% - Junior-legal
|
|
28
|
+
.Do CommandLine2
|
|
29
|
+
.SetVar CommandLine1c %CommandLine2% - Tabloid
|
|
30
|
+
.Do CommandLine2
|
|
31
|
+
.SetVar CommandLine1c %CommandLine2% - DL
|
|
32
|
+
.Do CommandLine2
|
|
33
|
+
.SetVar CommandLine1c %CommandLine2% - Credit-card
|
|
34
|
+
.Do CommandLine2
|
|
35
|
+
|
|
36
|
+
.SetVar CommandSubHeading Notes
|
|
37
|
+
.Do CommandSubHeading
|
|
38
|
+
.SetVar text Page sizes can only be set on the initial creation of a JsPdfDynamo object or when adding
|
|
39
|
+
.SetVar text %text% a new page.
|
|
40
|
+
.DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %text%
|
|
41
|
+
.incCurrentY %_FontHeight%
|