Skip to content

Commit

Permalink
🏷️ 🐛[placeholder-pdf-lib] Fix types: Import PDFPage from pdf-lib
Browse files Browse the repository at this point in the history
fixes #234
  • Loading branch information
vbuch committed Mar 15, 2024
1 parent 1c5eb64 commit 5b2bb09
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export function pdflibAddPlaceholder({ pdfDoc, pdfPage, reason, contactInfo, name, location, signingTime, signatureLength, byteRangePlaceholder, subFilter, widgetRect, appName, }: InputType): void;
export type PDFDocument = import('pdf-lib').PDFDocument;
export type PDFPage = import('pdf-lib').PDFPage;
export type InputType = {
pdfDoc: PDFDocument;
pdfPage: PDFPage;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 18 additions & 14 deletions packages/placeholder-pdf-lib/dist/pdflibAddPlaceholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,24 @@ var _pdfLib = require("pdf-lib");
*/

/**
* @typedef {object} InputType
* @property {PDFDocument} pdfDoc
* @property {PDFPage} pdfPage
* @property {string} reason
* @property {string} contactInfo
* @property {string} name
* @property {string} location
* @property {Date} [signingTime]
* @property {number} [signatureLength]
* @property {string} [byteRangePlaceholder]
* @property {string} [subFilter] One of SUBFILTER_* from \@signpdf/utils
* @property {number[]} [widgetRect] [x1, y1, x2, y2] widget rectangle
* @property {string} [appName] Name of the application generating the signature
*/
* @typedef {import('pdf-lib').PDFPage} PDFPage
*/

/**
* @typedef {object} InputType
* @property {PDFDocument} pdfDoc
* @property {PDFPage} pdfPage
* @property {string} reason
* @property {string} contactInfo
* @property {string} name
* @property {string} location
* @property {Date} [signingTime]
* @property {number} [signatureLength]
* @property {string} [byteRangePlaceholder]
* @property {string} [subFilter] One of SUBFILTER_* from \@signpdf/utils
* @property {number[]} [widgetRect] [x1, y1, x2, y2] widget rectangle
* @property {string} [appName] Name of the application generating the signature
*/

/**
* Adds a signature placeholder to a PDF-LIB PDFDocument.
Expand Down
32 changes: 18 additions & 14 deletions packages/placeholder-pdf-lib/src/pdflibAddPlaceholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,24 @@ import {
*/

/**
* @typedef {object} InputType
* @property {PDFDocument} pdfDoc
* @property {PDFPage} pdfPage
* @property {string} reason
* @property {string} contactInfo
* @property {string} name
* @property {string} location
* @property {Date} [signingTime]
* @property {number} [signatureLength]
* @property {string} [byteRangePlaceholder]
* @property {string} [subFilter] One of SUBFILTER_* from \@signpdf/utils
* @property {number[]} [widgetRect] [x1, y1, x2, y2] widget rectangle
* @property {string} [appName] Name of the application generating the signature
*/
* @typedef {import('pdf-lib').PDFPage} PDFPage
*/

/**
* @typedef {object} InputType
* @property {PDFDocument} pdfDoc
* @property {PDFPage} pdfPage
* @property {string} reason
* @property {string} contactInfo
* @property {string} name
* @property {string} location
* @property {Date} [signingTime]
* @property {number} [signatureLength]
* @property {string} [byteRangePlaceholder]
* @property {string} [subFilter] One of SUBFILTER_* from \@signpdf/utils
* @property {number[]} [widgetRect] [x1, y1, x2, y2] widget rectangle
* @property {string} [appName] Name of the application generating the signature
*/

/**
* Adds a signature placeholder to a PDF-LIB PDFDocument.
Expand Down

0 comments on commit 5b2bb09

Please sign in to comment.