Thanks for answer. Yes, I using DOMPDF 0.6.0 beta1.
But when I put into html before </body> next:
<script type="text/javascript">
this.print();
</script>
But when I open pdf-document then I got the error:
"There was an error openton this document. The file is damaged and
could not be repaired."
Please help to solve this problem.
Thanks.
Sergey R.
On 13 сен, 22:20, BrianS <
eclecticg...@gmail.com> wrote:
> DOMPDF 0.6.0 will support PDF JavaScript. According to the API there
> is a Doc.print() method. I don't generally use JavaScript in my PDF
> documents, so I couldn't say how exactly you would set this up.
> Perhaps you can just add to the end of your HTML document the
> following (inside the closing body tag):
>
> <script type="text/javascript">
> this.print(true)
> </script>
>
> But I don't know that this will work. Perhaps someone more familiar
> with PDF/JS can provide a little more guidance.
>
> Here the Adobe reference for Acrobat 8:
http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_...