Best practice for printing forms

I am just beginning to learn how to build web apps after several years using RS/Xojo for desktop apps.

My current project requires printing forms (invoices, quotes, receipts, etc … documents with headers and multiple lines). I will also need to print on label printers (patient arm bands, product bar code identifiers). Not sure what would be the best practice / recommendation to do this.

I referring just to the printing part. I know how to do input from users and store in databases.

Any suggestion will be greatly appreciated !!

For “regular” report printing there are a couple of options. Create an HTML page that you then present in a separate tab/window and then have the user print. Or use a reporting engine like Valentina Reports to produce a PDF that the user can print.

For specialty printing like labels, I don’t think there are any easy options. This kind of printing usually requires direct hardware control/interfacing, which you can’t get from inside a web browser. You might could create a desktop app that your users have to download and install that you could somehow hand off a report to.

How do you present the HTML in a new tab? I believe the ShowPage(newTab) method has been deprecated and now removed?

To bypass popup blockers the user has to click a WebLink. If you want to use a button or image as a link I have freeware available here.

While not completely automated, you can create a control in a web page of appropriate size (I use styled rectangles for borders), pass all the info you need into text fields and then the user can initiate the printing by control P etc. Browsers do a good job of defining printable area. One interesting thing I found with one of my apps for managing shipping labels, the staff at the company were using portrait and landscape modes from chrome to print large and small shipping manifests respectively.

Another option I have deployed was using custom electronics to provide usb printing over ethernet, I understand this is not easy for some nor what they want but it works extremely well. Considering allot of printers are network enabled its not difficult to initiate a print job from the server through cups on linux or windows server etc. You can create a console app for such a purpose and there are a million ways to get the data to the appropriate printer.

Puedes probar Valentina Reports, yo lo uso en varios proyectos Desktop y Web

Hello guys, sorry I did not reply before. I was out of circulation for the last month.

I really appreciate your suggestions. Now that I am restarting this project, I will put into good use your advise.

You can create forms as PDF and present them through the browser as showurl. When a PDF is presented to the browser, it opens Acrobat reader and the user simply prints the page. See the downloading example in the web section of examples in the Xojo folder.

Label printers are a different challenge, as most of the time they require to be sent character chains through a USB or serial interface, which cannot be done through the browser.

Thank you Michel. I will review that !!