|
@@ -4,9 +4,6 @@
|
|
|
import fileSaver from 'file-saver';
|
|
|
const { saveAs } = fileSaver;
|
|
|
|
|
|
- import jsPDF from 'jspdf';
|
|
|
- import html2canvas from 'html2canvas-pro';
|
|
|
-
|
|
|
const i18n = getContext('i18n');
|
|
|
|
|
|
import { marked } from 'marked';
|
|
@@ -575,6 +572,11 @@ ${content}
|
|
|
|
|
|
const downloadPdf = async (note) => {
|
|
|
try {
|
|
|
+ const [{ default: jsPDF }, { default: html2canvas }] = await Promise.all([
|
|
|
+ import('jspdf'),
|
|
|
+ import('html2canvas-pro')
|
|
|
+ ]);
|
|
|
+
|
|
|
// Define a fixed virtual screen size
|
|
|
const virtualWidth = 1024; // Fixed width (adjust as needed)
|
|
|
const virtualHeight = 1400; // Fixed height (adjust as needed)
|