Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/pdfkit

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/pdfkit - npm Package Compare versions

Comparing version 0.12.11 to 0.12.12

375

pdfkit/index.d.ts

@@ -36,3 +36,9 @@ // Type definitions for Pdfkit v0.12.3

interface PDFTilingPattern {
new(document: any, bbox: PDFKit.Mixins.BoundingBox, xStep: number, yStep: number, stream: string): PDFTilingPattern;
new(
document: any,
bbox: PDFKit.Mixins.BoundingBox,
xStep: number,
yStep: number,
stream: string,
): PDFTilingPattern;
createPattern(): PDFKitReference;

@@ -96,3 +102,8 @@ embedPatternColorSpaces(): void;

// example: "red" [R, G, B] [C, M, Y, K]
type ColorValue = string | PDFGradient | [PDFTilingPattern, TilingPatternColorValue] | [number, number, number] | [number, number, number, number];
type ColorValue = string | PDFGradient | [PDFTilingPattern, TilingPatternColorValue] | [number, number, number] | [
number,
number,
number,
number,
];

@@ -104,28 +115,245 @@ // The color forms accepted by PDFKit Tiling Pattern:

// The winding / filling rule accepted by PDFKit:
type RuleValue = 'even-odd' | 'evenodd' | 'non-zero' | 'nonzero';
type RuleValue = "even-odd" | "evenodd" | "non-zero" | "nonzero";
// Text option opentype features as listed at https://docs.microsoft.com/en-us/typography/opentype/spec/featurelist
type OpenTypeFeatures =
| 'aalt' | 'abvf' | 'abvm' | 'abvs' | 'afrc' | 'akhn' | 'blwf' | 'blwm' | 'blws' | 'calt' | 'case'
| 'cfar' | 'cjct' | 'clig' | 'cpct' | 'cpsp' | 'cswh' | 'curs' | 'cv01' | 'cv02' | 'cv03' | 'cv04'
| 'cv05' | 'cv06' | 'cv07' | 'cv08' | 'cv09' | 'cv10' | 'cv11' | 'cv12' | 'cv13' | 'cv14' | 'cv15'
| 'cv16' | 'cv17' | 'cv18' | 'cv19' | 'cv20' | 'cv21' | 'cv22' | 'cv23' | 'cv24' | 'cv25' | 'cv26'
| 'cv27' | 'cv28' | 'cv29' | 'cv30' | 'cv31' | 'cv32' | 'cv33' | 'cv34' | 'cv35' | 'cv36' | 'cv37'
| 'cv38' | 'cv39' | 'cv40' | 'cv41' | 'cv42' | 'cv43' | 'cv44' | 'cv45' | 'cv46' | 'cv47' | 'cv48'
| 'cv49' | 'cv50' | 'cv51' | 'cv52' | 'cv53' | 'cv54' | 'cv55' | 'cv56' | 'cv57' | 'cv58' | 'cv59'
| 'cv60' | 'cv61' | 'cv62' | 'cv63' | 'cv64' | 'cv65' | 'cv66' | 'cv67' | 'cv68' | 'cv69' | 'cv70'
| 'cv71' | 'cv72' | 'cv73' | 'cv74' | 'cv75' | 'cv76' | 'cv77' | 'cv78' | 'cv79' | 'cv80' | 'cv81'
| 'cv82' | 'cv83' | 'cv84' | 'cv85' | 'cv86' | 'cv87' | 'cv88' | 'cv89' | 'cv90' | 'cv91' | 'cv92'
| 'cv93' | 'cv94' | 'cv95' | 'cv96' | 'cv97' | 'cv98' | 'cv99' | 'c2pc' | 'c2sc' | 'dist' | 'ccmp'
| 'dlig' | 'dnom' | 'dtls' | 'expt' | 'falt' | 'fin2' | 'fin3' | 'fina' | 'flac' | 'frac' | 'fwid'
| 'half' | 'haln' | 'halt' | 'hist' | 'hkna' | 'hlig' | 'hngl' | 'hojo' | 'hwid' | 'init' | 'isol'
| 'ital' | 'jalt' | 'jp78' | 'jp83' | 'jp90' | 'jp04' | 'kern' | 'lfbd' | 'liga' | 'ljmo' | 'lnum'
| 'locl' | 'ltra' | 'ltrm' | 'mark' | 'med2' | 'medi' | 'mgrk' | 'mkmk' | 'mset' | 'nalt' | 'nlck'
| 'nukt' | 'numr' | 'onum' | 'opbd' | 'ordn' | 'ornm' | 'palt' | 'pcap' | 'pkna' | 'pnum' | 'pref'
| 'pres' | 'pstf' | 'psts' | 'pwid' | 'qwid' | 'rand' | 'rclt' | 'rkrf' | 'rlig' | 'rphf' | 'rtbd'
| 'rtla' | 'rtlm' | 'ruby' | 'rvrn' | 'salt' | 'sinf' | 'size' | 'smcp' | 'smpl' | 'ss01' | 'ss02'
| 'ss03' | 'ss04' | 'ss05' | 'ss06' | 'ss07' | 'ss08' | 'ss09' | 'ss10' | 'ss11' | 'ss12' | 'ss13'
| 'ss14' | 'ss15' | 'ss16' | 'ss17' | 'ss18' | 'ss19' | 'ss20' | 'ssty' | 'stch' | 'subs' | 'sups'
| 'swsh' | 'titl' | 'tjmo' | 'tnam' | 'tnum' | 'trad' | 'twid' | 'unic' | 'valt' | 'vatu' | 'vert'
| 'vhal' | 'vjmo' | 'vkna' | 'vkrn' | 'vpal' | 'vrt2' | 'vrtr' | 'zero';
| "aalt"
| "abvf"
| "abvm"
| "abvs"
| "afrc"
| "akhn"
| "blwf"
| "blwm"
| "blws"
| "calt"
| "case"
| "cfar"
| "cjct"
| "clig"
| "cpct"
| "cpsp"
| "cswh"
| "curs"
| "cv01"
| "cv02"
| "cv03"
| "cv04"
| "cv05"
| "cv06"
| "cv07"
| "cv08"
| "cv09"
| "cv10"
| "cv11"
| "cv12"
| "cv13"
| "cv14"
| "cv15"
| "cv16"
| "cv17"
| "cv18"
| "cv19"
| "cv20"
| "cv21"
| "cv22"
| "cv23"
| "cv24"
| "cv25"
| "cv26"
| "cv27"
| "cv28"
| "cv29"
| "cv30"
| "cv31"
| "cv32"
| "cv33"
| "cv34"
| "cv35"
| "cv36"
| "cv37"
| "cv38"
| "cv39"
| "cv40"
| "cv41"
| "cv42"
| "cv43"
| "cv44"
| "cv45"
| "cv46"
| "cv47"
| "cv48"
| "cv49"
| "cv50"
| "cv51"
| "cv52"
| "cv53"
| "cv54"
| "cv55"
| "cv56"
| "cv57"
| "cv58"
| "cv59"
| "cv60"
| "cv61"
| "cv62"
| "cv63"
| "cv64"
| "cv65"
| "cv66"
| "cv67"
| "cv68"
| "cv69"
| "cv70"
| "cv71"
| "cv72"
| "cv73"
| "cv74"
| "cv75"
| "cv76"
| "cv77"
| "cv78"
| "cv79"
| "cv80"
| "cv81"
| "cv82"
| "cv83"
| "cv84"
| "cv85"
| "cv86"
| "cv87"
| "cv88"
| "cv89"
| "cv90"
| "cv91"
| "cv92"
| "cv93"
| "cv94"
| "cv95"
| "cv96"
| "cv97"
| "cv98"
| "cv99"
| "c2pc"
| "c2sc"
| "dist"
| "ccmp"
| "dlig"
| "dnom"
| "dtls"
| "expt"
| "falt"
| "fin2"
| "fin3"
| "fina"
| "flac"
| "frac"
| "fwid"
| "half"
| "haln"
| "halt"
| "hist"
| "hkna"
| "hlig"
| "hngl"
| "hojo"
| "hwid"
| "init"
| "isol"
| "ital"
| "jalt"
| "jp78"
| "jp83"
| "jp90"
| "jp04"
| "kern"
| "lfbd"
| "liga"
| "ljmo"
| "lnum"
| "locl"
| "ltra"
| "ltrm"
| "mark"
| "med2"
| "medi"
| "mgrk"
| "mkmk"
| "mset"
| "nalt"
| "nlck"
| "nukt"
| "numr"
| "onum"
| "opbd"
| "ordn"
| "ornm"
| "palt"
| "pcap"
| "pkna"
| "pnum"
| "pref"
| "pres"
| "pstf"
| "psts"
| "pwid"
| "qwid"
| "rand"
| "rclt"
| "rkrf"
| "rlig"
| "rphf"
| "rtbd"
| "rtla"
| "rtlm"
| "ruby"
| "rvrn"
| "salt"
| "sinf"
| "size"
| "smcp"
| "smpl"
| "ss01"
| "ss02"
| "ss03"
| "ss04"
| "ss05"
| "ss06"
| "ss07"
| "ss08"
| "ss09"
| "ss10"
| "ss11"
| "ss12"
| "ss13"
| "ss14"
| "ss15"
| "ss16"
| "ss17"
| "ss18"
| "ss19"
| "ss20"
| "ssty"
| "stch"
| "subs"
| "sups"
| "swsh"
| "titl"
| "tjmo"
| "tnam"
| "tnum"
| "trad"
| "twid"
| "unic"
| "valt"
| "vatu"
| "vert"
| "vhal"
| "vjmo"
| "vkna"
| "vkrn"
| "vpal"
| "vrt2"
| "vrtr"
| "zero";

@@ -163,4 +391,4 @@ type BoundingBox = [number, number, number, number];

cover?: [number, number] | undefined;
align?: 'center' | 'right' | undefined;
valign?: 'center' | 'bottom' | undefined;
align?: "center" | "right" | undefined;
valign?: "center" | "bottom" | undefined;
link?: AnnotationOption | undefined;

@@ -217,10 +445,21 @@ goTo?: AnnotationOption | undefined;

/** The alignment of the text (center, justify, left, right) */
//TODO check this
align?: 'center' | 'justify' | 'left' | 'right' | string | undefined;
// TODO check this
align?: "center" | "justify" | "left" | "right" | string | undefined;
/** The vertical alignment of the text with respect to its insertion point */
baseline?: number | 'svg-middle' | 'middle' | 'svg-central' | 'bottom' | 'ideographic' | 'alphabetic' | 'mathematical' | 'hanging' | 'top' | undefined;
baseline?:
| number
| "svg-middle"
| "middle"
| "svg-central"
| "bottom"
| "ideographic"
| "alphabetic"
| "mathematical"
| "hanging"
| "top"
| undefined;
/** An array of OpenType feature tags to apply. If not provided, a set of defaults is used. */
features?: OpenTypeFeatures[] | undefined;
/** Sets a list as unordered, ordered or lettered */
listType?: 'bullet' | 'numbered' | 'lettered' | undefined;
listType?: "bullet" | "numbered" | "lettered" | undefined;
/** The radius of bullet points in a list. Works only with listType: 'bullet' */

@@ -327,3 +566,7 @@ bulletRadius?: number | undefined;

endMarkedContent(): this;
struct(tag: string, options?: StructureElementOptions, children?: PDFStructureElementChild | PDFStructureElementChild[]): PDFStructureElement;
struct(
tag: string,
options?: StructureElementOptions,
children?: PDFStructureElementChild | PDFStructureElementChild[],
): PDFStructureElement;
addStructure(structElem: PDFStructureElement): this;

@@ -340,3 +583,3 @@ initMarkings(options?: { tagged?: boolean }): void;

interface MarkingOptions {
type?: 'Pagination' | 'Layout' | 'Page';
type?: "Pagination" | "Layout" | "Page";
bbox?: [number, number, number, number];

@@ -397,3 +640,3 @@ attached?: string[];

declare module 'pdfkit/js/data' {
declare module "pdfkit/js/data" {
var PDFKitData: PDFKit.PDFData;

@@ -422,3 +665,3 @@ export = PDFKitData;

documentAssembly?: boolean | undefined;
printing?: 'lowResolution' | 'highResolution' | undefined;
printing?: "lowResolution" | "highResolution" | undefined;
}

@@ -432,3 +675,3 @@

permissions?: DocumentPermissions | undefined;
pdfVersion?: '1.3' | '1.4' | '1.5' | '1.6' | '1.7' | '1.7ext3' | undefined;
pdfVersion?: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.7ext3" | undefined;
autoFirstPage?: boolean | undefined;

@@ -438,3 +681,3 @@ size?: number[] | string | undefined;

margins?: { top: number; left: number; bottom: number; right: number } | undefined;
layout?: 'portrait' | 'landscape' | undefined;
layout?: "portrait" | "landscape" | undefined;
font?: string | undefined;

@@ -449,12 +692,14 @@

interface PDFDocument
extends NodeJS.ReadableStream,
Mixins.PDFAnnotation,
Mixins.PDFColor,
Mixins.PDFImage,
Mixins.PDFText,
Mixins.PDFVector,
Mixins.PDFFont,
Mixins.PDFAcroForm,
Mixins.PDFMarking,
Mixins.PDFAttachment {
extends
NodeJS.ReadableStream,
Mixins.PDFAnnotation,
Mixins.PDFColor,
Mixins.PDFImage,
Mixins.PDFText,
Mixins.PDFVector,
Mixins.PDFFont,
Mixins.PDFAcroForm,
Mixins.PDFMarking,
Mixins.PDFAttachment
{
/**

@@ -505,3 +750,3 @@ * PDF Version

declare module 'pdfkit' {
declare module "pdfkit" {
var doc: PDFKit.PDFDocument;

@@ -511,3 +756,3 @@ export = doc;

declare module 'pdfkit/js/gradient' {
declare module "pdfkit/js/gradient" {
var gradient: {

@@ -522,3 +767,3 @@ PDFGradient: PDFKit.PDFGradient;

declare module 'pdfkit/js/pattern' {
declare module "pdfkit/js/pattern" {
var pattern: {

@@ -561,3 +806,3 @@ PDFTilingPattern: PDFKit.PDFTilingPattern;

declare module 'pdfkit/js/page' {
declare module "pdfkit/js/page" {
var PDFKitPage: PDFKit.PDFPage;

@@ -589,3 +834,3 @@

declare module 'pdfkit/js/reference' {
declare module "pdfkit/js/reference" {
var PDFKitReference: PDFKit.PDFKitReference;

@@ -603,3 +848,3 @@

declare module 'pdfkit/js/structure_content' {
declare module "pdfkit/js/structure_content" {
var PDFStructureContent: PDFKit.PDFStructureContent;

@@ -611,3 +856,3 @@ export = PDFStructureContent;

type PDFStructureElementChild =
(() => any)
| (() => any)
| PDFStructureElement

@@ -622,7 +867,9 @@ | PDFStructureContent;

options?: { title?: string; lang?: string; alt?: string; expanded?: string; actual?: string },
children?: PDFStructureElementChild | PDFStructureElementChild[]);
children?: PDFStructureElementChild | PDFStructureElementChild[],
);
constructor(
document: PDFDocument,
type: string,
children?: PDFStructureElementChild | PDFStructureElementChild[]);
children?: PDFStructureElementChild | PDFStructureElementChild[],
);
add(el: PDFStructureElementChild): PDFStructureElement;

@@ -635,3 +882,3 @@ setParent(parentRef: PDFKitReference): void;

declare module 'pdfkit/js/structure_element' {
declare module "pdfkit/js/structure_element" {
var PDFStructureElement: PDFKit.PDFStructureElement;

@@ -641,3 +888,3 @@ export = PDFStructureElement;

declare module 'pdfkit/js/mixins/annotations' {
declare module "pdfkit/js/mixins/annotations" {
var PDFKitAnnotation: PDFKit.Mixins.PDFAnnotation;

@@ -647,3 +894,3 @@ export = PDFKitAnnotation;

declare module 'pdfkit/js/mixins/color' {
declare module "pdfkit/js/mixins/color" {
var PDFKitColor: PDFKit.Mixins.PDFColor;

@@ -653,3 +900,3 @@ export = PDFKitColor;

declare module 'pdfkit/js/mixins/fonts' {
declare module "pdfkit/js/mixins/fonts" {
var PDFKitFont: PDFKit.Mixins.PDFFont;

@@ -659,3 +906,3 @@ export = PDFKitFont;

declare module 'pdfkit/js/mixins/images' {
declare module "pdfkit/js/mixins/images" {
var PDFKitImage: PDFKit.Mixins.PDFImage;

@@ -665,3 +912,3 @@ export = PDFKitImage;

declare module 'pdfkit/js/mixins/text' {
declare module "pdfkit/js/mixins/text" {
var PDFKitText: PDFKit.Mixins.PDFText;

@@ -671,3 +918,3 @@ export = PDFKitText;

declare module 'pdfkit/js/mixins/vector' {
declare module "pdfkit/js/mixins/vector" {
var PDFKitVector: PDFKit.Mixins.PDFVector;

@@ -677,5 +924,5 @@ export = PDFKitVector;

declare module 'pdfkit/js/mixins/markings' {
declare module "pdfkit/js/mixins/markings" {
var PDFKitMarking: PDFKit.Mixins.PDFMarking;
export = PDFKitMarking;
}

4

pdfkit/package.json
{
"name": "@types/pdfkit",
"version": "0.12.11",
"version": "0.12.12",
"description": "TypeScript definitions for Pdfkit",

@@ -60,4 +60,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pdfkit",

},
"typesPublisherContentHash": "40c0526e731a5e35b60cff4ca3ba423c6348765bd18791ddb5db7d3a2c90aa82",
"typesPublisherContentHash": "565a5b882174fb56e1fc9b7ba90603cd7e149687353c6121fa93eb0d0e061bd9",
"typeScriptVersion": "4.5"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Fri, 15 Sep 2023 14:06:07 GMT
* Last updated: Sun, 24 Sep 2023 06:37:28 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)

@@ -14,0 +14,0 @@ * Global values: `PDFKit`

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc