Printing pdf files in a browser (e.g. Firefox) without opening the file
Copy link to clipboard
Copied
I have a web application, which is generating pdf files. Is it possible to print a pdf file on the default printer without opening the pdf file?
I want to click on the link of a pdf file and the file should be printed immediately on the default printer.
Copy link to clipboard
Copied
If the browser does not provide such a facility, then I don't see a way to do that.
Copy link to clipboard
Copied
I do not think this is a feature of the browser. In Firefox I can set that a PDF file is opened using a PDF viewer. At this point I would specify the Adobe reader. Instead of opening the PDF file this file should be printed immediately.
So my question is: Is it possible to configure the Adobe reader that the PDF file is printed immediately?
Copy link to clipboard
Copied
You can use a script to send the file to the printer as soon as it's opened, but it has to be loaded first.
Copy link to clipboard
Copied
No problem if the file is opened. What kind of script is this? Do you have an example, please?
Copy link to clipboard
Copied
It's a simple one-line JS code. Open the file in Acrobat and go to Tools - JavaScript - Document JavaScripts. Create a new item and paste this code into it (remove any code that is automatically generated):
this.print();
Save and close the file. The next time you open it the Print dialog will automatically appear.
Copy link to clipboard
Copied
I this is not that what I am searching for. If I understand it right, I have to put the script to every PDF file. But I want that this works with every PDF file without editing a script.
Also I can not find the function for JS in Tools menu. I only have export, create, send and save. I use the freeware version of Adobe reader.
Copy link to clipboard
Copied
That is something that you'll need to do in the HTML file, not in the PDF.
See this thread for some information about how to do it:
http://stackoverflow.com/questions/10296783/html-print-embed-file
On Mon, Mar 16, 2015 at 3:50 PM, bernda32943597 <forums_noreply@adobe.com>

