Page 1 of 1
Printer Support
Posted:
Mon Mar 26, 2012 4:52 pm
by andyf
Hi
Is there any chance printer support will be implemented soon. It's a deal breaker for me that Q7Basic supports printing Text and Graphics to a printed page.
Q7Basic is starting to look pretty good, with each new version making it more usable, but to me printing support is vital.
Andyf
Re: Printer Support
Posted:
Tue Mar 27, 2012 10:31 am
by berndnoetscher
Hi
When the form designer is implemented, the work on the report designer can start. It will take a few months to have the report designer, I think.
Re: Printer Support
Posted:
Tue Mar 27, 2012 6:56 pm
by andyf
Thanks for the reply. I was hoping for Printer Support other than through the use of reports.
I need to print data, but not from a SQLite database and was hoping Q7Basic would support the use
of commands similar to:
Startprinting StopPrinting Drawtext Drawsquare etc.
Perhaps the implementation in Q7basic will be much better than in KBasic, and will do what I want
but when I was evauluating KBasic, I couldn't see how I could use Reports for my needs.
Andyf
Re: Printer Support
Posted:
Wed Mar 28, 2012 1:51 pm
by Slowdown
Hi Andyf,
but when I was evauluating KBasic, I couldn't see how I could use Reports for my needs.
for your info you can print in KBasic without using reports.
see the CodeSnip example.
Re: Printer Support
Posted:
Wed Mar 28, 2012 2:07 pm
by Slowdown
Better yet,
It works in Q7B the same,
Form with QPlainTextEdit and a QPushButton
code in MainWindow,
- Code: Select all
Outlet plainTextEdit As QPlainTextEdit
Outlet pushButton As QPushButton
Signal on_pushButton_clicked(Checked As Boolean)
Application.PrintHtml(plainTextEdit.PlainText)
End Signal
Didn't test it with other Qt controls but the basic's are already pressent
Re: Printer Support
Posted:
Wed Mar 28, 2012 6:24 pm
by andyf
Thanks Slowdown
If I understand this correctly, Printhtml sends a text file formatted as HTML to the default printer and will print
the text component of the html code only.
Is there a way of selecting a different printer ? I want to be able to send output to
the printer, and a pdfprinter, using code to select the printer.
Andyf
Re: Printer Support
Posted:
Wed Mar 28, 2012 7:03 pm
by Slowdown
If I understand this correctly, Printhtml sends a text file formatted as HTML to the default printer and will print
the text component of the html code only.
I have tested it quickly with a plaintext file but i guess it will also work with html formatted files.
Is there a way of selecting a different printer ? I want to be able to send output to
the printer, and a pdfprinter, using code to select the printer.
I got the printerdialog so i was able to select a printer.
Re: Printer Support
Posted:
Wed Mar 28, 2012 7:27 pm
by Slowdown
did a quick test,
Added a second Pushbutton on the form.
- Code: Select all
Signal on_pushButton_2_clicked(Checked As Boolean)
Dim PrintFile As String
PrintFile = OpenFileDialog.GetFile("Select a file to print", "/", "")
PrintFile = ReadString(PrintFile)
Application.PrintHtml(PrintFile)
End Signal
Was able to print Html text to my pdf printer
Re: Printer Support
Posted:
Thu Mar 29, 2012 7:42 pm
by andyf
Thanks for your help Slowdown. I'll re-evaulate Q7Basic's printing capabailities using the examples you've kindly come up with.
Andyf