0.1.3 • Published 6 months ago

@types/svg-to-pdfkit v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/svg-to-pdfkit

Summary

This package contains type definitions for svg-to-pdfkit (https://github.com/alafr/SVG-to-PDFKit).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/svg-to-pdfkit.

index.d.ts

// Type definitions for svg-to-pdfkit 0.1
// Project: https://github.com/alafr/SVG-to-PDFKit
// Definitions by: Philipp Katz <https://github.com/qqilihq>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import PDFDocument = require('pdfkit');

declare function SVGtoPDF(
    doc: typeof PDFDocument,
    svg: SVGElement | string,
    x?: number,
    y?: number,
    options?: SVGtoPDF.SVGtoPDFOptions,
): void;

declare namespace SVGtoPDF {
    interface SVGtoPDFOptions {
        width?: number;
        height?: number;
        preserveAspectRatio?: string;
        useCSS?: boolean;
        fontCallback?: (
            family: string,
            bold: boolean,
            italic: boolean,
            fontOptions: { fauxItalic: boolean; fauxBold: boolean },
        ) => string;
        imageCallback?: (link: string) => string;
        documentCallback?: (file: string) => string;
        colorCallback?: (result: string, raw: string) => [[number, number, number], number];
        warningCallback?: (str: string) => void;
        assumePt?: boolean;
        precision?: number;
    }
}

export = SVGtoPDF;

Additional Details

  • Last updated: Thu, 21 Oct 2021 20:31:30 GMT
  • Dependencies: @types/pdfkit
  • Global values: none

Credits

These definitions were written by Philipp Katz.

0.1.2

7 months ago

0.1.1

8 months ago

0.1.3

6 months ago

0.1.0

3 years ago