[Gambas-user] Example for download and print in gb.web/gb.web.form
T Lee Davidson
t.lee.davidson at gmail.com
Thu Apr 30 07:31:53 CEST 2020
On 4/29/20 12:08 PM, Safiur Rahman wrote:
> Hi
>
> Passing path of created file does not work:
> ''Generating PDF
> sPath = Temp() & ".pdf
> Shell "wkhtmltopdf " & sHtml & " " & sPath Wait
>
> ''Printing PDF (generated above)
> Me.Exec("printJS('" & sPath & "')")
Did you get any error on the browser console that might indicate why it does not work?
> How can I get web root and how can I send file there? I have to run
> application with apache2 from/usr/lib/cgi-bin/ folder.
Application.Path should give you the directory where your program resides. Try:
Copy sPath To Application.Path
or
Copy sPath to "/usr/lib/cgi-bin/"
If you experience permission issues you may need to use CHMOD on the file.
http://gambaswiki.org/wiki/comp/gb.web/application
http://gambaswiki.org/wiki/lang/copy
http://gambaswiki.org/wiki/lang/chmod
--
Lee
More information about the User
mailing list