Hello,
I’m currently working on a web application with pages & windows (wisej version 2.5)
the users need to be able to print a report of the selected data.
I prepared a test (code see below), and it’s working on my local computer in visual studio, a pdf is generated correctly.
as soon I upload the visual studio files to the server and click the printer button, the wisej loading icon popup and the application is freezing.
I have on my local computer the same printer as on the server, I’ve set is as default “Microsoft Print to PDF”, I did it with a Try/Catch but no error message after clicking the printer button/picture. does somebody knows why it’s only working locally and if this can be solved? if yes please advice me how.
Thanks in advance, and wish you all a happy new year.
vb.net code below:
Public Class Window1
Dim PrintPDF As PrintDocument = New PrintDocument
Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles PictureBox3.Click
PrintDocument1.PrinterSettings.PrinterName = “Microsoft Print to PDF”
PrintDocument1.Print()
End Sub
Private Sub PrintDocument1_PrintPage(sender As Object, e As PrintPageEventArgs) Handles PrintDocument1.PrintPage
Try
e.Graphics.DrawString(“CardID: ” & Application.Session.sCardid, Label1.Font, Brushes.Black, 30, 40)
e.Graphics.DrawString(“Naam: ” & Application.Session.sUsername, Label1.Font, Brushes.Black, 30, 60)
e.Graphics.DrawLine(Pens.Black, 30, 80, 780, 80)
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End Class
yes indeed there’s a print dialog, where to enter the path and filename.
should work via this extension: https://github.com/iceteagroup/wisej-extensions/tree/2.5/Wisej.Web.Ext.PrintPreview
can somebody let me know the easiest way how to add this extension please?
I never did this before so don’t know which files I need to download and where to locate them and how to add them in visual studio.
thanks in advance.
Hi Bjorn
Please login first to submit.