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,63 @@
1
+ .SetVar ChapterName Possible Enhancements
2
+ .do ChapterHeading
3
+
4
+ .SetVar CommandLine1 The following is a list of possible enhancements to JsPdfDynamo:
5
+ .Do CommandLine
6
+ .incCurrentY %_FontHeight%
7
+
8
+ .SetVar CommandLine1 * Add an option to DrawDebugGrid to draw the grid within the page margins.
9
+ .Do CommandLine2
10
+
11
+ .SetVar CommandLine1 * Add an option to leave the current group.
12
+ .Do CommandLine2
13
+
14
+ .SetVar CommandLine1 * Implement more user friendly options, For example L, Left, C, Center, T, Top
15
+ .Do CommandLine2
16
+ .SetVar CommandLine1 for horizontal alignment within DrawTextBox.
17
+ .Do CommandLine2
18
+
19
+ .SetVar CommandLine1 * Display the examples in this document as 'code'. Ie Within a shaded box in a fixed font
20
+ .Do CommandLine2
21
+
22
+ .SetVar CommandLine1 * Have the ability to add highlighted URL links
23
+ .Do CommandLine2
24
+
25
+ .SetVar CommandLine1 * Pass parameters into commands. ie. .Do MyCommands(123 456 SomeText)
26
+ .Do CommandLine2
27
+
28
+ .SetVar CommandLine1 * Have all fumctions set the value of LastError. This also causes errors to be logged.
29
+ .Do CommandLine2
30
+
31
+ .incCurrentY %_FontHeight%
32
+ .SetVar CommandLine1 In addition, other clsDoPdf functions should be implemented, including:
33
+ .Do CommandLine
34
+ .incCurrentY %halfLineGap%
35
+
36
+ .SetVar CommandLine1 * IfZero, IfNeZero, IfEq, IfNE: Conditional calcs, etc
37
+ .Do CommandLine2
38
+
39
+ .SetVar CommandLine1 * Including fonts
40
+ .Do CommandLine2
41
+
42
+ .SetVar CommandLine1 * Including pictures
43
+ .Do CommandLine2
44
+
45
+ .SetVar CommandLine1 * Including input fields
46
+ .Do CommandLine2
47
+
48
+ .SetVar CommandLine1 * Including existing documents
49
+ .Do CommandLine2
50
+
51
+ .SetVar CommandLine1 * The dump command to list out all variable values
52
+ .Do CommandLine2
53
+ .SetVar LongText Note that the dump command could output to the logger. It would then be up to the calling program to provide some method of making that
54
+ .SetVar LongText %LongText% visible. For example, for a web page, there could be an endpoint, or option, that returns just the debug information.
55
+ .DrawTextWrapped 0 %_CurrentY% %_PageWidth% CommandCheckPage %LongText%
56
+
57
+ .incCurrentY %_FontHeight%
58
+ .SetVar CommandLine1 Additional system maintained variables:
59
+ .Do CommandLine
60
+ .incCurrentY %halfLineGap%
61
+
62
+ .SetVar CommandLine1 * CurrentFontStyle so it can be restored after a page overflow
63
+ .Do CommandLine2
@@ -0,0 +1,50 @@
1
+ .SetVar ChapterName To Be Documented
2
+ .do ChapterHeading
3
+
4
+ .DrawText 0 %_CurrentY% We definitely need to describe the 'groups of commands' and how they work. Maybe they
5
+ .DrawText 0 %_CurrentY% should be referred to as 'macros'?
6
+ .incCurrentY %halfLineGap%
7
+
8
+
9
+ .DrawText 0 %_CurrentY% There's a few methods not currently documented, sorry! Here's a partial list of them.
10
+ .incCurrentY %halfLineGap%
11
+
12
+ .SetVar Indent 5
13
+ .SetVar MaxWidth %_PageWidth%
14
+ .IncVar MaxWidth -%Indent%
15
+ .SetVar LongText * The JsPdfDynamo constructor.
16
+ .DrawTextWrapped %Indent% %_CurrentY% %MaxWidth% CommandCheckPage %LongText%
17
+
18
+ .SetVar CommandLine1 * The .AddImageFromFile/Url, DrawImage commands
19
+ .Do CommandLine2
20
+
21
+ .incCurrentY %halfLineGap%
22
+ .SetVar CommandLine1 AddImageFromFile sets _LastError, _LastResult & _LastImageAdded
23
+ .Do CommandLine2
24
+ .SetVar CommandLine1 AddImageFromUrl sets _LastError, _LastResult & _LastImageAdded
25
+ .Do CommandLine2
26
+ .SetVar CommandLine1 DrawImage imageId left top %scale (default=1 full size)
27
+ .Do CommandLine2
28
+
29
+ .incCurrentY %halfLineGap%
30
+ .SetVar CommandLine1 * The .SavePdf command
31
+ .Do CommandLine2
32
+
33
+ .SetVar CommandLine1 * The .SetTextColour, .SetFontName and .SetFontSize commands
34
+ .Do CommandLine2
35
+
36
+
37
+
38
+ .incCurrentY %_FontHeight%
39
+ .SetVar CommandLine1 The file TempDoco.txt contains descriptions of some of this missing documentation.
40
+ .Do CommandLine
41
+
42
+ .incCurrentY %_FontHeight%
43
+ .SetVar CommandLine1 Some complete script examples would be useful
44
+ .Do CommandLine
45
+
46
+ .incCurrentY %_FontHeight%
47
+ .SetVar CommandLine1 Having examples in a fixed font within a shaded box would also be an improvement.
48
+ .Do CommandLine
49
+
50
+ .incCurrentY %_FontHeight%