I am trying to use Print.JS to print all PDF files inside of a directory, called uploads. The code below is how far I have got so far, but it isn't working. I would appreciate any solutions or any advice!
Thanks
<html>
<head>
<link rel="stylesheet" type="text/css" href="/vendors/css/normalize.css">
<link rel="stylesheet" type="text/css" href="/vendors/css/grid.css">
<link rel="stylesheet" type="text/css" href="/vendors/css/animate.css">
<link rel="stylesheet" type="text/css" href="/Resources/css/style.css">
<link rel="stylesheet" type="text/css" href="/Resources/css/queries.css">
<link rel="stylesheet" type="text/css" href="/Resources/css/class.css">
<title>class1</title>
<script src="Vendors/js/print.min.js"></script>
</head>
<header>
<div class="sinclair-header">
<h1>Class 1 submissions</h1>
</div>
</header>
<body>
<section class="upload-box">
<div class="row">
<form action="upload.php" method="POST" enctype="multipart/form-data">
<div class="col span-1-of-2 box">
<input type="file" name="file">
</div>
<div class="col span-1-of-2 box">
<button type="submit" name="submit">Upload</button>
</div>
</form>
</div>
</section>
<section class="print">
<div class="row">
</div>
</section>
</body>
<?php
$files = scandir("uploads");
for ($a = 2; $a < count($files); $a++)
{
echo 'printJS('uploads/<?php echo $files[$a]; ?>')';
}
?>
</html>