Save iframe page as pdf?

I have this page called index.html

It has an iframe with the page index.php

I want a link in index.html that SAVES THE INDEX.PHP PAGE AS A PDF FILE

Example: invoicebubble - in edit mode saving the page as pdf

ive tried: and others but I cant seem to find an answer

any ideas? or any similar ideas?

someone told me this:

I think you need some JavaScript to grab the URL of the iframe, and then some AJAX to send it to a PHP script, which will then request it, and then convert the page to a valid PDF file. The AJAX will retrieve the PDF file, and prompt the user with a download.

Above can easily be done like:
$lines = file(‘’);

An alternative to using JavaScript, could be to simply feed the script with the URL, using a normal link, and a URL parameter. But this assumes you know the URL of the iframe.


Sponsor our Newsletter | Privacy Policy | Terms of Service