pdf-lite 1.2.1 → 1.3.1

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/EXAMPLES.md +1 -1
  2. package/dist/acroform/acroform.d.ts +272 -16
  3. package/dist/acroform/acroform.js +1084 -144
  4. package/dist/acroform/manager.d.ts +2 -2
  5. package/dist/acroform/manager.js +3 -3
  6. package/dist/core/decoder.d.ts +1 -1
  7. package/dist/core/decoder.js +3 -3
  8. package/dist/core/index.d.ts +2 -2
  9. package/dist/core/index.js +2 -2
  10. package/dist/core/objects/pdf-array.d.ts +1 -0
  11. package/dist/core/objects/pdf-array.js +4 -0
  12. package/dist/core/objects/pdf-dictionary.d.ts +1 -0
  13. package/dist/core/objects/pdf-dictionary.js +12 -0
  14. package/dist/core/objects/pdf-hexadecimal.d.ts +9 -2
  15. package/dist/core/objects/pdf-hexadecimal.js +25 -5
  16. package/dist/core/objects/pdf-indirect-object.d.ts +5 -3
  17. package/dist/core/objects/pdf-indirect-object.js +23 -5
  18. package/dist/core/objects/pdf-number.js +3 -0
  19. package/dist/core/objects/pdf-object.d.ts +6 -0
  20. package/dist/core/objects/pdf-object.js +10 -0
  21. package/dist/core/objects/pdf-stream.js +3 -0
  22. package/dist/core/objects/pdf-string.d.ts +11 -1
  23. package/dist/core/objects/pdf-string.js +24 -6
  24. package/dist/core/ref.d.ts +5 -0
  25. package/dist/core/ref.js +14 -0
  26. package/dist/core/serializer.d.ts +1 -1
  27. package/dist/core/serializer.js +1 -1
  28. package/dist/core/tokeniser.d.ts +2 -2
  29. package/dist/core/tokeniser.js +37 -75
  30. package/dist/core/tokens/hexadecimal-token.d.ts +8 -1
  31. package/dist/core/tokens/hexadecimal-token.js +20 -2
  32. package/dist/core/tokens/name-token.js +0 -3
  33. package/dist/core/tokens/string-token.d.ts +8 -1
  34. package/dist/core/tokens/string-token.js +20 -2
  35. package/dist/fonts/font-manager.js +6 -8
  36. package/dist/pdf/pdf-document.d.ts +12 -11
  37. package/dist/pdf/pdf-document.js +50 -42
  38. package/dist/pdf/pdf-revision.d.ts +33 -4
  39. package/dist/pdf/pdf-revision.js +100 -26
  40. package/dist/pdf/pdf-xref-lookup.js +3 -2
  41. package/dist/utils/decodeWithFontEncoding.d.ts +20 -0
  42. package/dist/utils/decodeWithFontEncoding.js +67 -0
  43. package/dist/utils/escapeString.d.ts +1 -1
  44. package/dist/utils/escapeString.js +12 -3
  45. package/dist/utils/glyphNameToUnicode.d.ts +10 -0
  46. package/dist/utils/glyphNameToUnicode.js +4292 -0
  47. package/dist/xfa/manager.js +2 -4
  48. package/package.json +1 -1
  49. /package/dist/core/{incremental-parser.d.ts → parser/incremental-parser.d.ts} +0 -0
  50. /package/dist/core/{incremental-parser.js → parser/incremental-parser.js} +0 -0
  51. /package/dist/core/{parser.d.ts → parser/parser.d.ts} +0 -0
  52. /package/dist/core/{parser.js → parser/parser.js} +0 -0
@@ -68,10 +68,8 @@ export class PdfXfaManager {
68
68
  * @returns The AcroForm dictionary or null if not found
69
69
  */
70
70
  async getAcroForm() {
71
- const catalog = this.document.rootDictionary;
72
- if (!catalog)
73
- return null;
74
- const acroFormRef = catalog.get('AcroForm');
71
+ const catalog = this.document.root;
72
+ const acroFormRef = catalog.content.get('AcroForm');
75
73
  if (!acroFormRef)
76
74
  return null;
77
75
  if (acroFormRef instanceof PdfObjectReference) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pdf-lite",
3
- "version": "1.2.1",
3
+ "version": "1.3.1",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "exports": {
File without changes
File without changes