@pixldocs/canvas-renderer 0.5.117 → 0.5.118
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.
- package/dist/index-Gf5_pgK7.cjs +18489 -0
- package/dist/index-Gf5_pgK7.cjs.map +1 -0
- package/dist/index-LbVR8GZp.js +18474 -0
- package/dist/index-LbVR8GZp.js.map +1 -0
- package/dist/index.cjs +36 -18109
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +36 -18092
- package/dist/index.js.map +1 -1
- package/dist/pdfFonts-BSytIe1x.cjs +995 -0
- package/dist/pdfFonts-BSytIe1x.cjs.map +1 -0
- package/dist/{svgTextToPath-CQ2Tp03U.js → pdfFonts-ts7v2Fja.js} +281 -639
- package/dist/pdfFonts-ts7v2Fja.js.map +1 -0
- package/dist/pdfWatermark-CewmS9qQ.js +36 -0
- package/dist/pdfWatermark-CewmS9qQ.js.map +1 -0
- package/dist/pdfWatermark-DdBUt6s5.cjs +36 -0
- package/dist/pdfWatermark-DdBUt6s5.cjs.map +1 -0
- package/dist/{svgColorUtils-BkKZ8cyd.js → svgColorUtils-CIehRL4U.js} +262 -1
- package/dist/{svgColorUtils-BkKZ8cyd.js.map → svgColorUtils-CIehRL4U.js.map} +1 -1
- package/dist/{svgColorUtils-DQN6fbIM.cjs → svgColorUtils-DKcCq1sO.cjs} +262 -1
- package/dist/{svgColorUtils-DQN6fbIM.cjs.map → svgColorUtils-DKcCq1sO.cjs.map} +1 -1
- package/dist/svgTextToPath-ByZSG1vO.cjs +665 -0
- package/dist/svgTextToPath-ByZSG1vO.cjs.map +1 -0
- package/dist/svgTextToPath-FrpfjI8G.js +626 -0
- package/dist/svgTextToPath-FrpfjI8G.js.map +1 -0
- package/dist/vectorPdfExport-CJd8RINw.js +4749 -0
- package/dist/vectorPdfExport-CJd8RINw.js.map +1 -0
- package/dist/vectorPdfExport-DMv7QYM5.cjs +4766 -0
- package/dist/vectorPdfExport-DMv7QYM5.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/svgTextToPath-4Y_THSBg.cjs +0 -1393
- package/dist/svgTextToPath-4Y_THSBg.cjs.map +0 -1
- package/dist/svgTextToPath-CQ2Tp03U.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -259,7 +259,7 @@ export declare function normalizeFontFamily(fontStack: string): string;
|
|
|
259
259
|
* Package version banner. Bump alongside package.json so we can confirm
|
|
260
260
|
* (via browser:log) that the deployed bundle matches the expected build.
|
|
261
261
|
*/
|
|
262
|
-
export declare const PACKAGE_VERSION = "0.5.
|
|
262
|
+
export declare const PACKAGE_VERSION = "0.5.118";
|
|
263
263
|
|
|
264
264
|
export declare interface PageSettings {
|
|
265
265
|
backgroundColor?: string;
|
|
@@ -412,6 +412,15 @@ export declare class PixldocsRenderer {
|
|
|
412
412
|
/**
|
|
413
413
|
* Render a pre-resolved template config to a vector PDF.
|
|
414
414
|
* Returns a Blob and ArrayBuffer.
|
|
415
|
+
*
|
|
416
|
+
* Unified path (v0.5.118+): delegates to the EXACT same
|
|
417
|
+
* `exportMultiPagePdf` pipeline used by the client-side editor / UseForm
|
|
418
|
+
* download buttons. This guarantees byte-identical output between the
|
|
419
|
+
* browser-side download and the server-side EC2 render — no separate SVG
|
|
420
|
+
* stitching path, no svg2pdf-only fallback. The only requirement is that
|
|
421
|
+
* each page is mounted as a real Fabric canvas (via `PreviewCanvas`) and
|
|
422
|
+
* registered in `fabricCanvasRegistry` before we hand off to the client
|
|
423
|
+
* exporter, which is what `renderPdfViaClientExport` does below.
|
|
415
424
|
*/
|
|
416
425
|
renderPdf(templateConfig: TemplateConfig, options?: {
|
|
417
426
|
title?: string;
|
|
@@ -428,6 +437,15 @@ export declare class PixldocsRenderer {
|
|
|
428
437
|
* Convenience: fetch by ID with flat data and render ALL pages.
|
|
429
438
|
*/
|
|
430
439
|
renderAllById(templateId: string, formData?: Record<string, any>, options?: Omit<RenderOptions, 'pageIndex'>): Promise<RenderResult[]>;
|
|
440
|
+
/**
|
|
441
|
+
* Mount every page of `templateConfig` as a real `PreviewCanvas` (so each
|
|
442
|
+
* `PageCanvas` registers its Fabric instance into `fabricCanvasRegistry`),
|
|
443
|
+
* then hand the prepared draw list off to the SAME `exportMultiPagePdf`
|
|
444
|
+
* function the client-side download buttons use. This guarantees 1:1
|
|
445
|
+
* parity between the browser-side PDF and the server-side EC2 PDF —
|
|
446
|
+
* same fonts, same gradients, same draw order, same selectable text.
|
|
447
|
+
*/
|
|
448
|
+
private renderPdfViaClientExport;
|
|
431
449
|
private getExpectedImageCount;
|
|
432
450
|
private waitForCanvasImages;
|
|
433
451
|
private waitForCanvasScene;
|