Author Topic: Suggestion for new version. Improve printing  (Read 2036 times)

0 Members and 1 Guest are viewing this topic.

Offline Juanjogomez

  • Forum Regular
  • Posts: 117
    • View Profile
Suggestion for new version. Improve printing
« on: August 23, 2021, 02:11:34 am »

Hi everyone.
I've been using QB64 in an accounting and warehouse management program for several years, and I print a lot of listings and invoices.
I think a lot of Qb64 users are currently focused on games and graphics, but I find it to be a great language for developing business applications with databases and reports. The versatility with respect to QB45 (which was the language I used in my programs) is enormous.
One limitation that I consider to be very great and would help a lot in the development of management programs is the printing options. Currently, to print an invoice or a list, I have to create a graphic page, load a template in JPG, fill it with the data and images of the company logo, etc. and then execute _PRINTIMAGE with each of the pages. The file that it sends to the printer, being graphic, is quite large and makes it not immediate, especially if what I want is to convert it into PDF with PDFCreator or some other similar program. A 20 page listing (very common) can take 30 minutes to generate, which is not operational.
Likewise, since there are 20 independent pages (although it is the same document) if I have the double-sided printer configured, it does not print double-sided because that only does it if it is a single document. I do not know if I explain myself very well.
A solution for large listings is the one Pete pointed me out, creating a text file and using WordPad in the background. With that method, converting the same 20-page listing to PDF takes 2-3 seconds. The problem that I see using an external program is that I do not trust that Windows 11, 12, 13 or 14 (to name them) removes WorPad, calls it something else or what do I know what Windows developers can do. Also with this method I cannot print images as it happens in the invoices in which the template and the logo are a JPG.
Anyway, after this roll, I think it would be interesting to include in the following versions another way of sending data to the printer, other than through images. I already know that LPRINT exists but it does not allow changing sizes or fonts, or anything like that.
Greetings

FellippeHeitor

  • Guest
Re: Suggestion for new version. Improve printing
« Reply #1 on: August 23, 2021, 08:29:57 am »
If you're using Windows, Zach's printing routines might be what you are looking for: https://www.qb64.org/forum/index.php?topic=4102.msg134503#msg134503

Offline Juanjogomez

  • Forum Regular
  • Posts: 117
    • View Profile
Re: Suggestion for new version. Improve printing
« Reply #2 on: August 24, 2021, 04:01:26 am »
Thanks FellippeHeitor
I will try to understand how it works to see how I can adapt it to my listings.
My fear is: if windows changes internally in future versions, will this still work?
JPG files cannot be included here to be able to use logos or invoice formats?

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Suggestion for new version. Improve printing
« Reply #3 on: August 24, 2021, 12:31:51 pm »

FellippeHeitor

  • Guest
Re: Suggestion for new version. Improve printing
« Reply #4 on: August 24, 2021, 12:33:58 pm »
My fear is: if windows changes internally in future versions, will this still work?

I don't think you should fear that so strongly.

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: Suggestion for new version. Improve printing
« Reply #5 on: August 25, 2021, 11:33:53 am »
My fear is: if windows changes internally in future versions, will this still work?

Well seeing how windows doesn't work now, without convoluted workarounds, I think I'm with Fellippe.
Granted after becoming radioactive I only have a half-life!