Reputation: 21
I have made a website and have an annoying problem.
If a visitor clicks on a link to a .pdf file, it opens in a new window as I specified in the code with target="_blank". When the .pdf opens, the print settings immediatly pop up, as if the user clicked on the 'print' button in his browser .pdf viewer.
How do I solve this? The print settings must not popup immediately. I don't think it is specified in my code, nor do I think it is a browser setting, because it only happens on my own website and not on other sites.
<h2>PDF File</h2>
<?php
if ($row_Recordset['file'] != NULL)
{ ?>
<a class="file_link" href="../files/<?php echo $row_Recordset['file']; ?>" target="_blank"><img src="../img/pdf.gif" width="40" height="40" alt="PDF File" />PDF File </a>
<?php
}
else
{
echo "<p>No file.</p>";
}
?>
The css contains the following:
.file_link { color: black; }
Upvotes: 2
Views: 1146
Reputation: 10418
This might be because your PDF files have an "open action" that invokes this dialog when the file is opened. Check this question and its answers for details: Generate a pdf that automatically prints
Upvotes: 1