fika-editor 3.4.4 → 3.4.5
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.
|
@@ -12,6 +12,10 @@ export interface FikaExportOptions extends Pick<PresentationExportOptions, 'medi
|
|
|
12
12
|
assetBaseUrl?: string;
|
|
13
13
|
/** PDF raster width in pixels. Default 2560, maximum 8192. */
|
|
14
14
|
width?: number;
|
|
15
|
+
/** JPEG avoids PNG decode/recompression in the PDF writer. Default image/jpeg. */
|
|
16
|
+
imageFormat?: 'image/jpeg' | 'image/png';
|
|
17
|
+
/** JPEG quality, 0–1. Default 0.95. PNG remains available for lossless output. */
|
|
18
|
+
quality?: number;
|
|
15
19
|
/** Resource timeout per slide in milliseconds. Default 30000. */
|
|
16
20
|
timeoutMs?: number;
|
|
17
21
|
onProgress?: (completed: number, total: number, detail?: FikaExportProgress) => void;
|
package/docs/EMBED.md
CHANGED
|
@@ -570,7 +570,7 @@ const pdf = await exportPresentationPdf(document, options)
|
|
|
570
570
|
```
|
|
571
571
|
|
|
572
572
|
PPTX retains editable elements. PDF uses the existing slide painter with one
|
|
573
|
-
high-resolution
|
|
573
|
+
high-resolution JPEG per page (2560 pixels wide by default), preserving slide
|
|
574
574
|
order and aspect ratio. PDF text is rasterized. No additional document IR is
|
|
575
575
|
required. Load `fika-embed.css` before PDF export so bundled fonts are available.
|
|
576
576
|
|
|
@@ -580,13 +580,18 @@ The optional `detail` (`FikaExportProgress`) includes `phase` (`preparing`, `ren
|
|
|
580
580
|
completed slides; packaging continues after all slides render, and `progress: 1`
|
|
581
581
|
is emitted only when the returned Blob is ready. Errors reject without a completion event.
|
|
582
582
|
|
|
583
|
-
PPTX generation, PDF
|
|
583
|
+
PPTX generation, PDF packaging, and font decoding run in module
|
|
584
584
|
workers. Serve the complete `dist/embed` directory, including worker and chunk
|
|
585
585
|
files, under `assetBaseUrl`; the host's CSP must permit same-origin workers.
|
|
586
586
|
DOM-dependent preparation still runs on the main thread with cooperative yields.
|
|
587
587
|
Omitted resolvers use the current embed configuration. Pass `null` explicitly
|
|
588
588
|
to disable a resolver. PDF also accepts `width` (64 to 8192 pixels) and
|
|
589
|
-
`timeoutMs` (default 30000 per slide).
|
|
589
|
+
`timeoutMs` (default 30000 per slide). `imageFormat` defaults to `image/jpeg` with
|
|
590
|
+
`quality: 0.95`; use `imageFormat: 'image/png'` for lossless output. JPEG bytes are
|
|
591
|
+
embedded directly without decoding and recompressing each page. Rendering uses
|
|
592
|
+
bounded concurrency and skips idle waits when all resources are ready. Export
|
|
593
|
+
time still depends on slide count, image downloads, raster size, and hardware.
|
|
594
|
+
Required watermark and PDF image failures
|
|
590
595
|
reject the promise. PPTX retains its existing partial-media warning behavior.
|
|
591
596
|
|
|
592
597
|
The native export dialog now offers `pptx`, `pdf`, and `json`; control their
|