@mlightcad/cad-pdf-plugin 1.7.0 → 1.7.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 (39) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +180 -164
  3. package/dist/cad-pdf-plugin-register.js +1 -1
  4. package/dist/cad-pdf-plugin-register.umd.cjs +1 -1
  5. package/dist/cad-pdf-plugin.js +17087 -41467
  6. package/dist/cad-pdf-plugin.umd.cjs +13 -270
  7. package/lib/AcApConvertToPdfCmd.d.ts +13 -2
  8. package/lib/AcApConvertToPdfCmd.d.ts.map +1 -1
  9. package/lib/AcApConvertToPdfCmd.js +153 -7
  10. package/lib/AcApConvertToPdfCmd.js.map +1 -1
  11. package/lib/AcApPdfConvertor.d.ts +18 -8
  12. package/lib/AcApPdfConvertor.d.ts.map +1 -1
  13. package/lib/AcApPdfConvertor.js +87 -94
  14. package/lib/AcApPdfConvertor.js.map +1 -1
  15. package/lib/AcApPdfExportOptions.d.ts +38 -0
  16. package/lib/AcApPdfExportOptions.d.ts.map +1 -0
  17. package/lib/AcApPdfExportOptions.js +12 -0
  18. package/lib/AcApPdfExportOptions.js.map +1 -0
  19. package/lib/AcApPdfFontResolver.d.ts +20 -0
  20. package/lib/AcApPdfFontResolver.d.ts.map +1 -0
  21. package/lib/AcApPdfFontResolver.js +105 -0
  22. package/lib/AcApPdfFontResolver.js.map +1 -0
  23. package/lib/AcApPdfGlyphProvider.d.ts +15 -0
  24. package/lib/AcApPdfGlyphProvider.d.ts.map +1 -0
  25. package/lib/AcApPdfGlyphProvider.js +277 -0
  26. package/lib/AcApPdfGlyphProvider.js.map +1 -0
  27. package/lib/AcApPdfPlugin.d.ts +5 -3
  28. package/lib/AcApPdfPlugin.d.ts.map +1 -1
  29. package/lib/AcApPdfPlugin.js +13 -6
  30. package/lib/AcApPdfPlugin.js.map +1 -1
  31. package/lib/index.d.ts +2 -0
  32. package/lib/index.d.ts.map +1 -1
  33. package/lib/index.js +2 -0
  34. package/lib/index.js.map +1 -1
  35. package/lib/register.d.ts +4 -2
  36. package/lib/register.d.ts.map +1 -1
  37. package/lib/register.js +4 -2
  38. package/lib/register.js.map +1 -1
  39. package/package.json +9 -9
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,164 +1,180 @@
1
- # @mlightcad/cad-pdf-plugin
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/cad-pdf-plugin.svg)](https://www.npmjs.com/package/@mlightcad/cad-pdf-plugin)
5
-
6
- PDF **export** and **import** plugin for [`@mlightcad/cad-simple-viewer`](../cad-simple-viewer). Registers two system commands:
7
-
8
- | Command | Description |
9
- |---------|-------------|
10
- | `cpdf` | Export the current drawing to a vector PDF (SVG pipeline → jsPDF) |
11
- | `ipdf` | Import vector geometry from a PDF file into model space |
12
-
13
- The plugin is designed for **lazy loading** so PDF libraries (`jspdf`, `pdfjs-dist`, `svg2pdf.js`) are only downloaded when a user runs `cpdf` or `ipdf`.
14
-
15
- ## Key features
16
-
17
- - **Vector PDF export** — renders model-space entities via `@mlightcad/cad-svg-plugin`, then converts SVG to PDF with `svg2pdf.js`
18
- - **PDF import** — parses vector paths from the first page of a PDF (lines, polylines, Bézier curves) and appends CAD entities
19
- - **Plugin API** — implements `AcApPlugin`; register once with `registerLazyPdfPlugin`
20
- - **Framework-agnostic** — no Vue/React dependency; works anywhere `cad-simple-viewer` runs
21
-
22
- ## Installation
23
-
24
- ```bash
25
- pnpm add @mlightcad/cad-pdf-plugin
26
- ```
27
-
28
- Peer dependencies:
29
-
30
- - `@mlightcad/cad-simple-viewer`
31
- - `@mlightcad/data-model`
32
- - `@mlightcad/cad-svg-plugin`
33
-
34
- Runtime dependencies (bundled with this package):
35
-
36
- - `jspdf`
37
- - `pdfjs-dist`
38
- - `svg2pdf.js`
39
-
40
- ## Build
41
-
42
- Produces `dist/index.js` (main library) and `dist/register.js` (lazy-registration entry).
43
-
44
- ```bash
45
- pnpm --filter @mlightcad/cad-pdf-plugin build
46
- ```
47
-
48
- ## Usage
49
-
50
- ### Lazy registration (recommended)
51
-
52
- Register the plugin with the document manager's plugin manager. Import from the `/register` subpath so only the registration stub enters your initial bundle; the main plugin chunk loads on first use of `cpdf` or `ipdf`:
53
-
54
- ```typescript
55
- import { AcApDocManager } from '@mlightcad/cad-simple-viewer'
56
- import { registerLazyPdfPlugin } from '@mlightcad/cad-pdf-plugin/register'
57
-
58
- registerLazyPdfPlugin(AcApDocManager.instance.pluginManager)
59
- ```
60
-
61
- Do **not** import `registerLazyPdfPlugin` from the package root in application code — that resolves to the full library build and defeats lazy loading.
62
-
63
- Equivalent manual registration:
64
-
65
- ```typescript
66
- import {
67
- createPdfPlugin,
68
- PDF_PLUGIN_NAME,
69
- PDF_PLUGIN_TRIGGERS
70
- } from '@mlightcad/cad-pdf-plugin'
71
-
72
- AcApDocManager.instance.pluginManager.registerLazyPlugin({
73
- name: PDF_PLUGIN_NAME,
74
- triggers: [...PDF_PLUGIN_TRIGGERS],
75
- loader: createPdfPlugin
76
- })
77
- ```
78
-
79
- After registration, users (or your UI) invoke commands through the editor:
80
-
81
- ```typescript
82
- // Export current drawing to PDF
83
- await AcApDocManager.instance.editor.executeCommand('cpdf')
84
-
85
- // Open file picker and import PDF vectors
86
- await AcApDocManager.instance.editor.executeCommand('ipdf')
87
- ```
88
-
89
- `cad-viewer` registers this plugin automatically via `registerLazyPlugins()` in its app bootstrap.
90
-
91
- ### Eager registration
92
-
93
- If you prefer loading PDF support up front:
94
-
95
- ```typescript
96
- import { AcApPdfPlugin } from '@mlightcad/cad-pdf-plugin'
97
-
98
- await AcApDocManager.instance.pluginManager.loadPlugin(new AcApPdfPlugin())
99
- ```
100
-
101
- ### Programmatic convertors
102
-
103
- You can bypass the command layer and call the convertors directly:
104
-
105
- ```typescript
106
- import { AcApContext } from '@mlightcad/cad-simple-viewer'
107
- import { AcApPdfConvertor, AcApPdfImportConvertor } from '@mlightcad/cad-pdf-plugin'
108
-
109
- // Export
110
- const context: AcApContext = /* active context */
111
- await new AcApPdfConvertor().convert(context)
112
-
113
- // Import from bytes
114
- const buffer: ArrayBuffer = /* PDF file */
115
- await new AcApPdfImportConvertor().convert(context, buffer, 1) // page 1
116
- ```
117
-
118
- ## How it works
119
-
120
- ### Export (`cpdf`)
121
-
122
- 1. Iterate model-space entities and render with `AcSvgRenderer` (respects linetype scale, lineweight display, font mapping, background/foreground colors).
123
- 2. Parse the SVG and pass it to `svg2pdf.js` inside a `jsPDF` document sized to the SVG viewBox.
124
- 3. Trigger a browser download as `drawing.pdf`.
125
-
126
- ### Import (`ipdf`)
127
-
128
- 1. Show a native file picker (`.pdf`).
129
- 2. Use `pdfjs-dist` to read operator lists from the selected page.
130
- 3. Convert path operators (move, line, cubic Bézier, close) into `AcDbLine` / `AcDbPolyline` entities in model space.
131
-
132
- Import is **vector-only**; raster/scanned PDF pages produce no entities. Only the requested page is processed (default: page 1).
133
-
134
- ## Main exports
135
-
136
- | Export | Role |
137
- |--------|------|
138
- | `createPdfPlugin` | Async factory used by lazy loader |
139
- | `PDF_PLUGIN_NAME`, `PDF_PLUGIN_TRIGGERS` | Plugin id and command triggers |
140
- | `@mlightcad/cad-pdf-plugin/register` | `registerLazyPdfPlugin` and registration constants |
141
- | `AcApPdfPlugin` | `AcApPlugin` implementation |
142
- | `AcApConvertToPdfCmd` | `cpdf` command class |
143
- | `AcApImportPdfCmd` | `ipdf` command class |
144
- | `AcApPdfConvertor` | SVG → PDF export utility |
145
- | `AcApPdfImportConvertor` | PDF → CAD entities import utility |
146
-
147
- ## Project layout
148
-
149
- | Path | Role |
150
- |------|------|
151
- | `src/register.ts` | Lazy plugin registration (`/register` entry) and `createPdfPlugin` |
152
- | `src/AcApPdfPlugin.ts` | Plugin lifecycle (`onLoad` / `onUnload`) |
153
- | `src/AcApConvertToPdfCmd.ts` | `cpdf` command |
154
- | `src/AcApImportPdfCmd.ts` | `ipdf` command |
155
- | `src/AcApPdfConvertor.ts` | Export pipeline (SVG renderer + jsPDF) |
156
- | `src/AcApPdfImportConvertor.ts` | Import pipeline (pdf.js operator parsing) |
157
-
158
- ## Role in MLightCAD
159
-
160
- This package extends `cad-simple-viewer` with optional PDF I/O. It depends on `cad-svg-plugin` for export quality parity with the existing SVG export command (`csvg`) and keeps heavy PDF dependencies out of the core viewer bundle through lazy loading.
161
-
162
- ## License
163
-
164
- MIT
1
+ # @mlightcad/cad-pdf-plugin
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/cad-pdf-plugin.svg)](https://www.npmjs.com/package/@mlightcad/cad-pdf-plugin)
5
+
6
+ PDF **export** and **import** plugin for [`@mlightcad/cad-simple-viewer`](../cad-simple-viewer). Registers system commands:
7
+
8
+ | Command | Description |
9
+ |---------|-------------|
10
+ | `-cpdf` | Export via **command-line prompts** (no dialog; AutoCAD-style `-` prefix) |
11
+ | `cpdf` | Same as `-cpdf` when no UI command is registered. In [`cad-viewer`](../cad-viewer), `cpdf` opens an **export options dialog** instead |
12
+ | `ipdf` | Import vector geometry from a PDF file into model space |
13
+
14
+ The plugin is designed for **lazy loading** so PDF libraries (`pdf-lib` via `@mlightcad/pdf-renderer`, `pdfjs-dist`) are only downloaded when a user runs `-cpdf` / `cpdf` or `ipdf`.
15
+
16
+ ## Key features
17
+
18
+ - **Vector PDF export** — renders model space and each paper-space layout as PDF pages with `@mlightcad/pdf-renderer` (native AcGi PDF backend). Paper-space pages include model content shown through viewports, clipped to each viewport frame.
19
+ - **Busy indicator** — export shows the same conversion spinner as `chtml` so the browser stays responsive
20
+ - **Export options** — model-space framing (`Extents` / `Display`) and optional paper-space layouts
21
+ - **PDF import** — parses vector paths from the first page of a PDF (lines, polylines, Bézier curves) and appends CAD entities
22
+ - **Plugin API** — implements `AcApPlugin`; register once with `registerLazyPdfPlugin`
23
+ - **Framework-agnostic** — no Vue/React dependency; works anywhere `cad-simple-viewer` runs
24
+
25
+ ## Installation
26
+
27
+ ```bash
28
+ pnpm add @mlightcad/cad-pdf-plugin
29
+ ```
30
+
31
+ Peer dependencies:
32
+
33
+ - `@mlightcad/cad-simple-viewer`
34
+ - `@mlightcad/data-model`
35
+ - `@mlightcad/pdf-renderer`
36
+
37
+ Runtime dependencies (bundled with this package):
38
+
39
+ - `pdfjs-dist` (import only)
40
+
41
+ ## Build
42
+
43
+ Produces `dist/index.js` (main library) and `dist/register.js` (lazy-registration entry).
44
+
45
+ ```bash
46
+ pnpm --filter @mlightcad/cad-pdf-plugin build
47
+ ```
48
+
49
+ ## Usage
50
+
51
+ ### Lazy registration (recommended)
52
+
53
+ Register the plugin with the document manager's plugin manager. Import from the `/register` subpath so only the registration stub enters your initial bundle; the main plugin chunk loads on first use of `-cpdf`, `cpdf`, or `ipdf`:
54
+
55
+ ```typescript
56
+ import { AcApDocManager } from '@mlightcad/cad-simple-viewer'
57
+ import { registerLazyPdfPlugin } from '@mlightcad/cad-pdf-plugin/register'
58
+
59
+ registerLazyPdfPlugin(AcApDocManager.instance.pluginManager)
60
+ ```
61
+
62
+ Do **not** import `registerLazyPdfPlugin` from the package root in application code — that resolves to the full library build and defeats lazy loading.
63
+
64
+ Equivalent manual registration:
65
+
66
+ ```typescript
67
+ import {
68
+ createPdfPlugin,
69
+ PDF_PLUGIN_NAME,
70
+ PDF_PLUGIN_TRIGGERS
71
+ } from '@mlightcad/cad-pdf-plugin'
72
+
73
+ AcApDocManager.instance.pluginManager.registerLazyPlugin({
74
+ name: PDF_PLUGIN_NAME,
75
+ triggers: [...PDF_PLUGIN_TRIGGERS],
76
+ loader: createPdfPlugin
77
+ })
78
+ ```
79
+
80
+ After registration, users (or your UI) invoke commands through the editor:
81
+
82
+ ```typescript
83
+ // Export current drawing to PDF (command-line prompts)
84
+ await AcApDocManager.instance.editor.executeCommand('-cpdf')
85
+
86
+ // Open file picker and import PDF vectors
87
+ await AcApDocManager.instance.editor.executeCommand('ipdf')
88
+ ```
89
+
90
+ In [`cad-viewer`](../cad-viewer), use `cpdf` to open the export options dialog; `-cpdf` remains available on the command line for prompt-based export.
91
+
92
+ `cad-viewer` registers this plugin automatically via `registerLazyPlugins()` in its app bootstrap and registers the `cpdf` dialog command separately.
93
+
94
+ ### Eager registration
95
+
96
+ If you prefer loading PDF support up front:
97
+
98
+ ```typescript
99
+ import { AcApPdfPlugin } from '@mlightcad/cad-pdf-plugin'
100
+
101
+ await AcApDocManager.instance.pluginManager.loadPlugin(new AcApPdfPlugin())
102
+ ```
103
+
104
+ ### Programmatic convertors
105
+
106
+ You can bypass the command layer and call the convertors directly:
107
+
108
+ ```typescript
109
+ import { AcApContext } from '@mlightcad/cad-simple-viewer'
110
+ import {
111
+ AcApPdfConvertor,
112
+ AcApPdfImportConvertor,
113
+ resolveAcApPdfExportOptions
114
+ } from '@mlightcad/cad-pdf-plugin'
115
+
116
+ // Export
117
+ const context: AcApContext = /* active context */
118
+ await new AcApPdfConvertor().convert(
119
+ context,
120
+ resolveAcApPdfExportOptions({
121
+ modelSpaceFit: 'extents',
122
+ exportLayouts: true
123
+ })
124
+ )
125
+
126
+ // Import from bytes
127
+ const buffer: ArrayBuffer = /* PDF file */
128
+ await new AcApPdfImportConvertor().convert(context, buffer, 1) // page 1
129
+ ```
130
+
131
+ ## How it works
132
+
133
+ ### Export (`-cpdf` / dialog)
134
+
135
+ 1. Collect options: model-space framing (`Extents` / `Display`) and whether to export layouts.
136
+ 2. Show the application busy overlay (same animation pattern as `chtml`).
137
+ 3. Call `@mlightcad/pdf-renderer` `exportDatabaseToPdf`. With layouts enabled, model space and every paper space become one PDF page each.
138
+ 4. Download the resulting PDF bytes.
139
+
140
+ ### Import (`ipdf`)
141
+
142
+ 1. Show a native file picker (`.pdf`).
143
+ 2. Use `pdfjs-dist` to read operator lists from the selected page.
144
+ 3. Convert path operators (move, line, cubic Bézier, close) into `AcDbLine` / `AcDbPolyline` entities in model space.
145
+
146
+ Import is **vector-only**; raster/scanned PDF pages produce no entities. Only the requested page is processed (default: page 1).
147
+
148
+ ## Main exports
149
+
150
+ | Export | Role |
151
+ |--------|------|
152
+ | `createPdfPlugin` | Async factory used by lazy loader |
153
+ | `PDF_PLUGIN_NAME`, `PDF_PLUGIN_TRIGGERS` | Plugin id and command triggers |
154
+ | `@mlightcad/cad-pdf-plugin/register` | `registerLazyPdfPlugin` and registration constants |
155
+ | `AcApPdfPlugin` | `AcApPlugin` implementation |
156
+ | `AcApConvertToPdfCmd` | `-cpdf` / fallback `cpdf` command class |
157
+ | `AcApImportPdfCmd` | `ipdf` command class |
158
+ | `AcApPdfConvertor` | CAD → PDF export utility |
159
+ | `AcApPdfExportOptions`, `resolveAcApPdfExportOptions` | Export option types and defaults |
160
+ | `AcApPdfImportConvertor` | PDF → CAD entities import utility |
161
+
162
+ ## Project layout
163
+
164
+ | Path | Role |
165
+ |------|------|
166
+ | `src/register.ts` | Lazy plugin registration (`/register` entry) and `createPdfPlugin` |
167
+ | `src/AcApPdfPlugin.ts` | Plugin lifecycle (`onLoad` / `onUnload`) |
168
+ | `src/AcApConvertToPdfCmd.ts` | `-cpdf` command (command-line prompts) |
169
+ | `src/AcApImportPdfCmd.ts` | `ipdf` command |
170
+ | `src/AcApPdfConvertor.ts` | Export pipeline (`exportDatabaseToPdf`) |
171
+ | `src/AcApPdfExportOptions.ts` | Export option types and defaults |
172
+ | `src/AcApPdfImportConvertor.ts` | Import pipeline (pdf.js operator parsing) |
173
+
174
+ ## Role in MLightCAD
175
+
176
+ This package extends `cad-simple-viewer` with optional PDF I/O. Export uses `@mlightcad/pdf-renderer`; import uses `pdfjs-dist`. Heavy PDF dependencies stay out of the core viewer bundle through lazy loading.
177
+
178
+ ## License
179
+
180
+ MIT
@@ -1,4 +1,4 @@
1
- const s = "PdfPlugin", o = ["cpdf", "ipdf"];
1
+ const s = "PdfPlugin", o = ["-cpdf", "cpdf", "ipdf"];
2
2
  function P(r, e = {}) {
3
3
  const t = e.disableExport === !0, i = t ? ["ipdf"] : [...o];
4
4
  r.registerLazyPlugin({
@@ -1 +1 @@
1
- "use strict";var o=Object.create;var n=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var u=(t,e,r,P)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of d(e))!l.call(t,i)&&i!==r&&n(t,i,{get:()=>e[i],enumerable:!(P=a(e,i))||P.enumerable});return t};var f=(t,e,r)=>(r=t!=null?o(c(t)):{},u(e||!t||!t.__esModule?n(r,"default",{value:t,enumerable:!0}):r,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s="PdfPlugin",g=["cpdf","ipdf"];function G(t,e={}){const r=e.disableExport===!0,P=r?["ipdf"]:[...g];t.registerLazyPlugin({name:s,triggers:[...P],loader:async()=>{const{createPdfPlugin:i}=await import("@mlightcad/cad-pdf-plugin");return i({disableExport:r})}})}exports.PDF_PLUGIN_NAME=s;exports.PDF_PLUGIN_TRIGGERS=g;exports.registerLazyPdfPlugin=G;
1
+ "use strict";var o=Object.create;var n=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var u=(t,e,r,P)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of d(e))!l.call(t,i)&&i!==r&&n(t,i,{get:()=>e[i],enumerable:!(P=a(e,i))||P.enumerable});return t};var f=(t,e,r)=>(r=t!=null?o(c(t)):{},u(e||!t||!t.__esModule?n(r,"default",{value:t,enumerable:!0}):r,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s="PdfPlugin",g=["-cpdf","cpdf","ipdf"];function p(t,e={}){const r=e.disableExport===!0,P=r?["ipdf"]:[...g];t.registerLazyPlugin({name:s,triggers:[...P],loader:async()=>{const{createPdfPlugin:i}=await import("@mlightcad/cad-pdf-plugin");return i({disableExport:r})}})}exports.PDF_PLUGIN_NAME=s;exports.PDF_PLUGIN_TRIGGERS=g;exports.registerLazyPdfPlugin=p;