Hi, I tried to use the browser client to load an html template and render it as pdf on my web page. I tried to download pdf file too and everything works fine.
My question is.. is it possible to render pdf report and send it directly to printer from the browser (without load a preview on the page, or maybe loading it, hidden or not, but printing without interaction with the user)?
If isn't possible to get a direct pdf print, could I get this result rendering the report in html format? as an alternative solution..
Posts made by Girolamo Trisolini
-
Send report directly to printer
-
Preview pdf report on browser
Hi, I'm newbe on jsreport.
I'm just trying to get a sample report via Api. This is my code on a simple html file for a test:var data = { "template": { "name" : "invoice-template" }, "data" : { "to": "Pavel Sladek", "from": "Jan Blaha", "price": 800 } }; $.post( "http://localhost:5488/api/report", data) .done(function( result ) { console.log('OK'); }) .fail(function( err ) { alert( "Errore: " + err ); });
The "result" variable contains the pdf result stream.
I'd like to show this result in a "pdf preview" on the web page (like the preview in jsreport studio).
is there a way to show the contents of the pdf?
or is the only way to save it and to generate a pdf file on disk to upload it later?