jspdf-dynamo 1.0.5 → 1.0.7
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/README.md +3 -3
- package/dist/index.cjs +199 -33
- package/dist/index.d.cts +14 -10
- package/dist/index.d.ts +14 -10
- package/dist/index.js +199 -33
- package/documentation/1. Introduction/Introduction.txt +1 -1
- package/documentation/3. Variables/Introduction.txt +13 -12
- package/documentation/3. Variables/SystemMaintained.txt +40 -0
- package/documentation/4. Commands/DrawBox.txt +6 -9
- package/documentation/4. Commands/DrawCircle.txt +71 -0
- package/documentation/4. Commands/DrawEllipse.txt +75 -0
- package/documentation/4. Commands/DrawTextWrapped.txt +1 -1
- package/documentation/4. Commands/IfBlank.txt +9 -14
- package/documentation/4. Commands/IfEq.txt +3 -2
- package/documentation/4. Commands/IfGt.txt +2 -1
- package/documentation/4. Commands/IfNe.txt +54 -0
- package/documentation/4. Commands/IfNotBlank.txt +9 -13
- package/documentation/4. Commands/LoadImageFromFile.txt +2 -2
- package/documentation/4. Commands/LoadImageFromUrl.txt +2 -2
- package/documentation/4. Commands/SetFillColour.txt +4 -2
- package/documentation/4. Commands/SetFontName.txt +80 -1
- package/documentation/4. Commands/SetFontSize.txt +43 -1
- package/documentation/4. Commands/SetFontStyle.txt +4 -5
- package/documentation/4. Commands/SetLineColour.txt +5 -2
- package/documentation/4. Commands/SetTextColour.txt +4 -2
- package/documentation/5. Other Definitions/pageSizes.txt +3 -3
- package/documentation/Documentation.pdf +0 -0
- package/documentation/documentation.txt +3 -0
- package/examples/1.Simple/simple.pdf +18 -186
- package/examples/2.Invoice/data.txt +21 -0
- package/examples/2.Invoice/gearz.png +0 -0
- package/examples/2.Invoice/invoice.pdf +0 -0
- package/examples/2.Invoice/invoice.spec.ts +62 -0
- package/examples/2.Invoice/parts.json +324 -0
- package/examples/2.Invoice/template.txt +136 -0
- package/package.json +1 -1
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
[Initialise]
|
|
2
|
+
.SetMargin a 10
|
|
3
|
+
.SetVar MetaPrompt 130
|
|
4
|
+
.SetVar MetaData 155
|
|
5
|
+
.SetSpaceVert 0.7
|
|
6
|
+
.SetLineWidth 0.3
|
|
7
|
+
.SetVar CurrentPage 1
|
|
8
|
+
.SetVar NextPage 2
|
|
9
|
+
[End]
|
|
10
|
+
|
|
11
|
+
[FirstPageHeader]
|
|
12
|
+
.LoadImageFromFile ./examples/2.Invoice/gearz.png
|
|
13
|
+
.SetVar LogoId %_LastImageAdded%
|
|
14
|
+
.DrawImage %LogoId% 0 0 40
|
|
15
|
+
.SetFontSize 24
|
|
16
|
+
.SetFontStyle Bold
|
|
17
|
+
.DrawTextBox 0 0 %_PageWidth% 10 C T %DocumentCaption%
|
|
18
|
+
|
|
19
|
+
.Do MetaData Address
|
|
20
|
+
.SetCurrentY 70
|
|
21
|
+
[End]
|
|
22
|
+
|
|
23
|
+
[MetaData]
|
|
24
|
+
.Do NormalText
|
|
25
|
+
.SetVar top %_CurrentY%
|
|
26
|
+
.DrawText %MetaPrompt% %top% %DocumentType% No:
|
|
27
|
+
.DrawText %MetaData% %top% %DocumentNo%
|
|
28
|
+
|
|
29
|
+
.SetVar top %_CurrentY%
|
|
30
|
+
.DrawText %MetaPrompt% %top% %DocumentType% Date:
|
|
31
|
+
.DrawText %MetaData% %top% %docDate%
|
|
32
|
+
|
|
33
|
+
.SetVar top %_CurrentY%
|
|
34
|
+
.DrawText %MetaPrompt% %top% Customer No:
|
|
35
|
+
.DrawText %MetaData% %top% %CustNo%
|
|
36
|
+
|
|
37
|
+
.SetVar top %_CurrentY%
|
|
38
|
+
.DrawText %MetaPrompt% %top% Reference:
|
|
39
|
+
.DrawText %MetaData% %top% %CustRef%
|
|
40
|
+
|
|
41
|
+
.SetVar pageNoTop %_CurrentY%
|
|
42
|
+
[End]
|
|
43
|
+
|
|
44
|
+
[NumberPages]
|
|
45
|
+
.DrawText %MetaPrompt% %pageNoTop% Page:
|
|
46
|
+
.DrawText %MetaData% %pageNoTop% %_PageNo% of %_Pages%
|
|
47
|
+
[End]
|
|
48
|
+
|
|
49
|
+
[NormalText]
|
|
50
|
+
.SetFontSize 11
|
|
51
|
+
.SetFontStyle Normal
|
|
52
|
+
[End]
|
|
53
|
+
|
|
54
|
+
[Address]
|
|
55
|
+
.SetVar left 10
|
|
56
|
+
.SetVar right 90
|
|
57
|
+
.SetFontSize 9
|
|
58
|
+
.SetVar top 40
|
|
59
|
+
.DrawText 5 %top% %to1%:
|
|
60
|
+
.DrawText 85 %top% %to2%:
|
|
61
|
+
|
|
62
|
+
.do NormalText
|
|
63
|
+
.SetVar top %_CurrentY%
|
|
64
|
+
.DrawText %left% %top% %Name1%
|
|
65
|
+
.ifNotBlank Addr1Line1 .DrawText %left% %_CurrentY% %Addr1Line1%
|
|
66
|
+
.ifNotBlank Addr1Line2 .DrawText %left% %_CurrentY% %Addr1Line2%
|
|
67
|
+
.DrawText %left% %_CurrentY% %City1% %State1% %Zip1%
|
|
68
|
+
|
|
69
|
+
.DrawText %right% %top% %Name2%
|
|
70
|
+
.ifNotBlank Addr2Line1 .DrawText %right% %_CurrentY% %Addr2Line1%
|
|
71
|
+
.ifNotBlank Addr2Line2 .DrawText %right% %_CurrentY% %Addr2Line2%
|
|
72
|
+
.DrawText %right% %_CurrentY% %City2% %State2% %Zip2%
|
|
73
|
+
[End]
|
|
74
|
+
|
|
75
|
+
[Headings]
|
|
76
|
+
.drawLine 0 %_CurrentY% %_PageWidth% %_CurrentY%
|
|
77
|
+
.IncCurrentY %_SpaceVert%
|
|
78
|
+
.setVar top %_CurrentY%
|
|
79
|
+
.DrawText 0 %top% Line
|
|
80
|
+
.DrawText 9 %top% Part No.
|
|
81
|
+
.DrawText 43 %top% Description
|
|
82
|
+
.DrawTextBox 125 %top% 20 %_FontHeight% r t Quantity
|
|
83
|
+
.DrawTextBox 145 %top% 20 %_FontHeight% r t Price
|
|
84
|
+
.DrawTextBox 165 %top% 20 %_FontHeight% r t Extended
|
|
85
|
+
.IncCurrentY %_SpaceVert%
|
|
86
|
+
.drawLine 0 %_CurrentY% %_PageWidth% %_CurrentY%
|
|
87
|
+
[End]
|
|
88
|
+
|
|
89
|
+
[CheckPage]
|
|
90
|
+
.CheckPage 15 NextPage
|
|
91
|
+
[End]
|
|
92
|
+
|
|
93
|
+
[NextPage]
|
|
94
|
+
.IncCurrentY %_SpaceVert%
|
|
95
|
+
.DrawLine 0 %_CurrentY% %_PageWidth% %_CurrentY%
|
|
96
|
+
.IncCurrentY %_SpaceVert%
|
|
97
|
+
.DrawTextBox 0 %_CurrentY% %_PageWidth% %_FontHeight% c t Continued on page %NextPage%
|
|
98
|
+
.IncVar NextPage 1
|
|
99
|
+
.AddPage
|
|
100
|
+
.SetFontSize 24
|
|
101
|
+
.SetFontStyle Bold
|
|
102
|
+
.DrawTextBox 0 0 %_PageWidth% 10 C T %DocumentCaption% - Continued
|
|
103
|
+
.Do MetaData
|
|
104
|
+
.IncCurrentY %_FontHeight% %_FontHeight%
|
|
105
|
+
.Do Headings
|
|
106
|
+
.IncCurrentY %_SpaceVert%
|
|
107
|
+
.DrawTextBox 0 %_CurrentY% %_PageWidth% %_FontHeight% c t Continued from page %CurrentPage%
|
|
108
|
+
.IncVar CurrentPage 1
|
|
109
|
+
[End]
|
|
110
|
+
|
|
111
|
+
[AddPart]
|
|
112
|
+
.Do CheckPage
|
|
113
|
+
.setVar top %_CurrentY%
|
|
114
|
+
.DrawTextBox 0 %top% 6 %_FontHeight% r t %ix%
|
|
115
|
+
.DrawText 9 %top% %PartNo%
|
|
116
|
+
.DrawTextWrapped 43 %top% 80 CheckPage %Description%
|
|
117
|
+
.SetVar NextTop %_CurrentY%
|
|
118
|
+
.DrawTextBox 125 %top% 20 %_FontHeight% r t %Qty%
|
|
119
|
+
.DrawTextBox 145 %top% 20 %_FontHeight% r t %Price%
|
|
120
|
+
.DrawTextBox 165 %top% 20 %_FontHeight% r t %total%
|
|
121
|
+
.SetCurrentY %NextTop%
|
|
122
|
+
[End]
|
|
123
|
+
|
|
124
|
+
[Totals]
|
|
125
|
+
.Do CheckPage
|
|
126
|
+
.IncCurrentY %_SpaceVert%
|
|
127
|
+
.DrawLine 0 %_CurrentY% %_PageWidth% %_CurrentY%
|
|
128
|
+
.IncCurrentY %_SpaceVert%
|
|
129
|
+
.setVar top %_CurrentY%
|
|
130
|
+
.DrawTextBox 43 %top% 80 %_FontHeight% r t %DocumentType% Totals
|
|
131
|
+
.SetFontStyle Bold
|
|
132
|
+
.DrawTextBox 165 %top% 20 %_FontHeight% r t %total%
|
|
133
|
+
.IncCurrentY %_SpaceVert%
|
|
134
|
+
.DrawLine 0 %_CurrentY% %_PageWidth% %_CurrentY%
|
|
135
|
+
.Do NormalText
|
|
136
|
+
[End]
|