@mlightcad/pdf-renderer 1.7.1 → 1.7.3

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 (64) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +29 -29
  3. package/dist/index.js +6738 -7619
  4. package/dist/index.umd.cjs +72 -73
  5. package/lib/AcPdfExport.d.ts.map +1 -1
  6. package/lib/AcPdfExport.js +64 -53
  7. package/lib/AcPdfExport.js.map +1 -1
  8. package/lib/index.d.ts +2 -1
  9. package/lib/index.d.ts.map +1 -1
  10. package/lib/index.js +1 -1
  11. package/lib/index.js.map +1 -1
  12. package/lib/linetype/AcPdfLineTypeStroker.d.ts +49 -4
  13. package/lib/linetype/AcPdfLineTypeStroker.d.ts.map +1 -1
  14. package/lib/linetype/AcPdfLineTypeStroker.js +163 -13
  15. package/lib/linetype/AcPdfLineTypeStroker.js.map +1 -1
  16. package/lib/pdf/AcPdfContentWriter.d.ts +5 -3
  17. package/lib/pdf/AcPdfContentWriter.d.ts.map +1 -1
  18. package/lib/pdf/AcPdfContentWriter.js +13 -5
  19. package/lib/pdf/AcPdfContentWriter.js.map +1 -1
  20. package/lib/pdf/AcPdfDocumentWriter.d.ts +3 -4
  21. package/lib/pdf/AcPdfDocumentWriter.d.ts.map +1 -1
  22. package/lib/pdf/AcPdfDocumentWriter.js +32 -18
  23. package/lib/pdf/AcPdfDocumentWriter.js.map +1 -1
  24. package/lib/pdf/AcPdfFontManager.d.ts +10 -0
  25. package/lib/pdf/AcPdfFontManager.d.ts.map +1 -1
  26. package/lib/pdf/AcPdfFontManager.js +35 -5
  27. package/lib/pdf/AcPdfFontManager.js.map +1 -1
  28. package/lib/pdf/AcPdfPageLayout.d.ts +19 -0
  29. package/lib/pdf/AcPdfPageLayout.d.ts.map +1 -1
  30. package/lib/pdf/AcPdfPageLayout.js +30 -0
  31. package/lib/pdf/AcPdfPageLayout.js.map +1 -1
  32. package/lib/point/AcPdfPointSymbol.d.ts +38 -0
  33. package/lib/point/AcPdfPointSymbol.d.ts.map +1 -0
  34. package/lib/point/AcPdfPointSymbol.js +72 -0
  35. package/lib/point/AcPdfPointSymbol.js.map +1 -0
  36. package/lib/renderer/AcPdfEntity.d.ts +12 -3
  37. package/lib/renderer/AcPdfEntity.d.ts.map +1 -1
  38. package/lib/renderer/AcPdfEntity.js +7 -1
  39. package/lib/renderer/AcPdfEntity.js.map +1 -1
  40. package/lib/renderer/AcPdfMatrixUtil.d.ts +23 -0
  41. package/lib/renderer/AcPdfMatrixUtil.d.ts.map +1 -1
  42. package/lib/renderer/AcPdfMatrixUtil.js +15 -0
  43. package/lib/renderer/AcPdfMatrixUtil.js.map +1 -1
  44. package/lib/renderer/AcPdfRenderer.d.ts +22 -0
  45. package/lib/renderer/AcPdfRenderer.d.ts.map +1 -1
  46. package/lib/renderer/AcPdfRenderer.js +266 -100
  47. package/lib/renderer/AcPdfRenderer.js.map +1 -1
  48. package/lib/renderer/AcPdfStyle.d.ts +7 -0
  49. package/lib/renderer/AcPdfStyle.d.ts.map +1 -1
  50. package/lib/renderer/AcPdfStyle.js.map +1 -1
  51. package/lib/renderer/AcPdfStyleUtil.d.ts.map +1 -1
  52. package/lib/renderer/AcPdfStyleUtil.js +16 -7
  53. package/lib/renderer/AcPdfStyleUtil.js.map +1 -1
  54. package/lib/renderer/AcPdfTextLayout.d.ts.map +1 -1
  55. package/lib/renderer/AcPdfTextLayout.js +8 -2
  56. package/lib/renderer/AcPdfTextLayout.js.map +1 -1
  57. package/lib/viewport/AcPdfPaperSpaceExport.d.ts +14 -2
  58. package/lib/viewport/AcPdfPaperSpaceExport.d.ts.map +1 -1
  59. package/lib/viewport/AcPdfPaperSpaceExport.js +80 -3
  60. package/lib/viewport/AcPdfPaperSpaceExport.js.map +1 -1
  61. package/lib/viewport/AcPdfViewportContent.d.ts.map +1 -1
  62. package/lib/viewport/AcPdfViewportContent.js +4 -1
  63. package/lib/viewport/AcPdfViewportContent.js.map +1 -1
  64. package/package.json +5 -4
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 mlightcad
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 mlightcad
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,29 +1,29 @@
1
- # @mlightcad/pdf-renderer
2
-
3
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
- [![npm version](https://img.shields.io/npm/v/@mlightcad/pdf-renderer.svg)](https://www.npmjs.com/package/@mlightcad/pdf-renderer)
5
-
6
- Native **AcGi PDF renderer** for `@mlightcad/data-model`. Converts a drawing database to a vector PDF without going through SVG or a viewer.
7
-
8
- This package does **not** depend on `@mlightcad/cad-simple-viewer`. Viewer integration lives in [`@mlightcad/cad-pdf-plugin`](../cad-pdf-plugin).
9
-
10
- Export includes patterned and gradient hatches, SHX/mesh glyph paths with `/ActualText`, OCG layers, INSERT marked content (layer 0 follows the INSERT), complex linetype walking, Form XObject reuse, and optional multi-layout (paper space) pages.
11
-
12
- ## Usage
13
-
14
- ```typescript
15
- import { AcDbDatabase } from '@mlightcad/data-model'
16
- import { exportDatabaseToPdf } from '@mlightcad/pdf-renderer'
17
-
18
- const db: AcDbDatabase = /* loaded drawing */
19
- const bytes = await exportDatabaseToPdf(db, {
20
- showLineWeight: true,
21
- background: 'none'
22
- })
23
- ```
24
-
25
- ## Build
26
-
27
- ```bash
28
- pnpm --filter @mlightcad/pdf-renderer build
29
- ```
1
+ # @mlightcad/pdf-renderer
2
+
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
+ [![npm version](https://img.shields.io/npm/v/@mlightcad/pdf-renderer.svg)](https://www.npmjs.com/package/@mlightcad/pdf-renderer)
5
+
6
+ Native **AcGi PDF renderer** for `@mlightcad/data-model`. Converts a drawing database to a vector PDF without going through SVG or a viewer.
7
+
8
+ This package does **not** depend on `@mlightcad/cad-simple-viewer`. Viewer integration lives in [`@mlightcad/cad-pdf-plugin`](../cad-pdf-plugin).
9
+
10
+ Export includes patterned and gradient hatches, SHX/mesh glyph paths with `/ActualText`, OCG layers, INSERT marked content (layer 0 follows the INSERT), complex linetype walking, Form XObject reuse, and optional multi-layout (paper space) pages.
11
+
12
+ ## Usage
13
+
14
+ ```typescript
15
+ import { AcDbDatabase } from '@mlightcad/data-model'
16
+ import { exportDatabaseToPdf } from '@mlightcad/pdf-renderer'
17
+
18
+ const db: AcDbDatabase = /* loaded drawing */
19
+ const bytes = await exportDatabaseToPdf(db, {
20
+ showLineWeight: true,
21
+ background: 'none'
22
+ })
23
+ ```
24
+
25
+ ## Build
26
+
27
+ ```bash
28
+ pnpm --filter @mlightcad/pdf-renderer build
29
+ ```