Hi there
I want to make a pdf file after completely render the view, I mean when user can see the view, creating pdf file start
how can I do it? Like queue them?
Thanks in advanced
Hi there
I want to make a pdf file after completely render the view, I mean when user can see the view, creating pdf file start
how can I do it? Like queue them?
Thanks in advanced
Using javascript, after loaded the page you can change ‘window.location’ property, so
<html>
<head>
<script language="javascript">
window.onload = function() {
window.location = '/url/of/pdf/file';
};
</script>
</head>
<body>
....
</body>
</html>
thanks for fast reply
dont want to redirect the user, want to create the pdf file in the same aciton!
User will not be redirected, but forced to download file (if destination url contains pdf as Content-Type header value).
To launch creation of pdf, you could call the action using jquery in the view:
$this->registerJS( "$.get('/url/of/pdf/to/be/created');" );