Skip to content

Commit

Permalink
fix: add missing import for fetch to allow PDFs with watermarks (lega…
Browse files Browse the repository at this point in the history
…cy applets) (M2-8057) (#66)
  • Loading branch information
rcmerlo authored Oct 21, 2024
1 parent ea6c7f8 commit cd6a906
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 98 deletions.
110 changes: 13 additions & 97 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"markdown-it-task-lists": "^2.1.1",
"mime-types": "^2.1.35",
"moment-timezone": "^0.5.34",
"node-fetch": "^3.3.2",
"node-fetch": "2.7.0",
"pdf-lib": "^1.17.1",
"puppeteer": "^20.9.0",
"sqlite3": "^5.0.9",
Expand Down
1 change: 1 addition & 0 deletions src/pdf-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import puppeteer from 'puppeteer'
import { PDFDocument } from 'pdf-lib'
import { createDirectoryIfNotExists, getRandomFileName } from './core/helpers'
import { getAppletKeys } from './db'
import fetch from 'node-fetch'

export const convertHtmlToPdf = async (html: string, saveTo: string): Promise<void> => {
const browser = await puppeteer.launch({
Expand Down

0 comments on commit cd6a906

Please sign in to comment.