var actual_page = 1;
(async function loop() {
for (url_item of urls) {
var loadingTask = pdfjsLib.getDocument(url_item);
await loadingTask.promise.then(function (pdf) {
let i = 1;
while (i <= pdf.numPages) {
var pageNumber = i;
pdf.getPage(pageNumber).then(function (page) {
//render pdf and print actual_page++
}