![]() |
|
#1
|
|||
|
|||
|
Best way to print embeded pdf ?
Hi all, I'm relativity new to HTML and am teaching myself as I go. At the moment, I'm wanting to print an embedded pdf and am not having much luck...
I have the pdf file hosted on my server and am using an iframe to display it. I want to have a graphic image that acts as a button that, when clicked will print only my embedded pdf. Here's what I have so far... For the pdf... <iframe src="my_pdf.pdf" width="1150" height="800></iframe> For the print button... <a href="javascript:window.print();"><img src="mysite.com/print_image.png" width="175" height="75" hspace="20" /></a> The pdf displays fine on the website, and I can use the adobe pdf toolbar to print it, but I'd really like a separate button to print... Does anyone have any ideas to print the embedded pdf content ? |
| Sponsored Links |
|
#2
|
||||
|
||||
|
I'm not sure exactly how you're using it, but I don't allow embedded pdf files to be shown for this reason:
(from Wikipedia) Viruses and exploits PDF attachments carrying viruses were first discovered in 2001. The virus, named "OUTLOOK.PDFWorm" or "Peachy", uses Microsoft Outlook to send itself as an attachment to an Adobe PDF file. It was activated with Adobe Acrobat, but not with Acrobat Reader.[67] From time to time, new vulnerabilities are discovered[68] in various versions of Adobe Reader, prompting the company to issue security fixes. Other PDF readers are also susceptible. One aggravating factor is that a PDF reader can be configured to start automatically if a web page has an embedded PDF file, providing a vector for attack. If a malicious web page contains an infected PDF file that takes advantage of a vulnerability in the PDF reader, the system may be compromised even if the browser is secure. Some of these vulnerabilities are a result of the PDF standard allowing PDF documents to be scripted with JavaScript. Disabling JavaScript execution in the PDF reader can help mitigate such future exploits, although it will not provide protection against exploits in other parts of the PDF viewing software. Security experts say that JavaScript is not essential for a PDF reader, and that the security benefit that comes from disabling JavaScript outweighs any compatibility issues caused.[69] One way of avoiding PDF file exploits is to have a local or web service convert files to another format before viewing.[70] On March 30, 2010 security researcher Didier Stevens reported an Adobe Reader and Foxit Reader exploit which runs a malicious executable if the user allows it to launch when asked.[71] I think linking to the pdf file would be the best solution.
__________________
"We should consider every day lost on which we have not danced at least once."
— Friedrich Wilhelm Nietzsche Become a To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. on Facebook! |
|
#3
|
|||
|
|||
|
The pdfs I'm displaying are things like permits and applications.
This is going into a kiosk that will be running a web based package, so the only pc that should ever access the page with the pdf is the one in the kiosk ( unless I'm doing testing on my pc ) |
|
#4
|
|||
|
|||
|
Rob, you will want the following, most-likely
Code:
<a href="my_pdf.pdf" onclick="window.print();return false">Print File</a> |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A Perl Grammar Corrector | iTom | User Submitted Tutorials | 4 | 04-15-2007 02:41 PM |
| Print CSS and IE on Windows | dzinr38 | CSS | 1 | 10-08-2005 05:27 PM |
| Displaying table data files in a loop | Anarchist | Advanced Programming | 0 | 11-05-2004 08:53 PM |
| Email Form in Flash | Gadget | Flash | 8 | 04-09-2004 06:14 AM |
| FormMail | aisuruneko | Advanced Programming | 26 | 11-27-2003 01:47 PM |