You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
import { jsPDF } from "jspdf";
|
|
|
|
|
|
|
|
|
|
let ExcelPlaceholder = {
|
|
|
|
|
"[tabName]":"&A",
|
|
|
|
|
"[CurrentDate]":"&D",
|
|
|
|
|
"[fileName]":"&F",
|
|
|
|
|
"[background]":"&G",
|
|
|
|
|
"[Shadow]":"&H",
|
|
|
|
|
"[TotalPages]":"&N",
|
|
|
|
|
"[pageNumber]":"&P",
|
|
|
|
|
"[CurrentTime]":"&T",
|
|
|
|
|
"[filePath]":"&Z",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Get the pixel value per millimeter
|
|
|
|
|
function getOneMmsPx (){
|
|
|
|
|
let div = document.createElement("div");
|
|
|
|
|
div.id = "mm";
|
|
|
|
|
div.style.width = "1mm";
|
|
|
|
|
document.querySelector("body").appendChild(div);
|
|
|
|
|
let mm1 = document.getElementById("mm").getBoundingClientRect();
|
|
|
|
|
return mm1.width;
|
|
|
|
|
}
|