mirror of
https://github.com/Elvanos/fantasia-archive.git
synced 2024-05-18 11:13:15 +12:00
added pdfkit
This commit is contained in:
parent
18ae5ff59d
commit
ac21593f08
614
package-lock.json
generated
614
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -23,6 +23,7 @@
|
|||
"katex": "^0.12.0",
|
||||
"lodash": "^4.17.20",
|
||||
"mermaid": "^8.8.4",
|
||||
"pdfkit": "^0.12.1",
|
||||
"pouchdb": "^7.2.2",
|
||||
"pouchdb-adapter-idb": "^7.2.2",
|
||||
"pouchdb-find": "^7.2.2",
|
||||
|
|
|
@ -241,7 +241,7 @@ import { retrieveCurrentProjectName } from "src/scripts/projectManagement/projec
|
|||
// @ts-ignore
|
||||
import json2md from "json2md/lib/index.js"
|
||||
// @ts-ignore
|
||||
// import PDFkit from "pdfkit/js/pdfkit.standalone.js"
|
||||
import PDFkit from "pdfkit/js/pdfkit.standalone.js"
|
||||
// @ts-ignore
|
||||
import htmlParseStringify from "html-parse-stringify/dist/html-parse-stringify.modern.js"
|
||||
import DialogBase from "src/components/dialogs/_DialogBase"
|
||||
|
@ -848,8 +848,7 @@ export default class ExportProject extends DialogBase {
|
|||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||
const doc: I_PDFKitDocument = "" as unknown as I_PDFKitDocument
|
||||
// new PDFkit({ size: "A4" })
|
||||
const doc: I_PDFKitDocument = new PDFkit({ size: "A4" })
|
||||
|
||||
// Start stream
|
||||
doc.pipe(fs.createWriteStream(`${documentDirectory}/${exportFileName}.pdf`))
|
||||
|
|
Loading…
Reference in a new issue