fixing pdf not having number of slides attached

This commit is contained in:
Chris Cochrun 2023-11-13 10:21:39 -06:00
parent ac13d675a0
commit b1eef88c8a

View file

@ -337,15 +337,14 @@ Item {
function addPres(url) {
console.log(pdf.status);
console.log("FILE IS: " + url);
let pageCount = 1;
if (url.endsWith(".pdf")) {
pdf.source = url;
while (pdf.status != 2) {
console.log(pdf.status);
console.log("PAGECOUNT: " + pdf.pageCount);
pageCount = pdf.pageCount;
}
console.log(pdf.status);
console.log("PAGECOUNT: " + pdf.pageCount);
pageCount = pdf.pageCount;
} else
pageCount = 1;