Printing to printer - Linux - LPRINT alternative? - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11) +--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2) +--- Thread: Printing to printer - Linux - LPRINT alternative? (/showthread.php?tid=1701) |
RE: Printing to printer - Linux - LPRINT alternative? - mnrvovrfc - 05-30-2023 (05-30-2023, 02:34 AM)desA Wrote: 2. SHELL - rm old files. SHELL cat file1.txt file2.txt >> file_summary.txt etc This is a step that could be bettered and it's possible to save slow calls to the command processor. Did you take a look at what I proposed in post #14? It's possible to put text files together, which have to be loaded from disk, to create a big temporary text file that is then exported to PDF. Only you need to be organized about it according to the series numbers used for the small text files generated by your project. RE: Printing to printer - Linux - LPRINT alternative? - desA - 05-30-2023 Progress update Thus far (working well): 1. Capture text in lumps - per major print subroutine (8 off them) - write to txt. Some display/print depending on menu choices in the design. 2. SHELL - rm old files. SHELL cat file1.txt file2.txt >> file_summary.txt etc 3. SHELL linux convert txt->ps 4. SHELL linux convert ps->pdf 5. Launch pdf readers ************* Limit/memory bleed in excessive use of SHELL command - scrambles output. Suspect SHELL buffer limit was exceeded. Wrote external BASH routine and called that from SHELL instead. RE: Printing to printer - Linux - LPRINT alternative? - desA - 05-30-2023 (05-30-2023, 07:20 AM)mnrvovrfc Wrote:(05-30-2023, 02:34 AM)desA Wrote: 2. SHELL - rm old files. SHELL cat file1.txt file2.txt >> file_summary.txt etc At the moment, I'm working towards a functional version. Due to nature of the program - there are many different blocks that either have content, or not. Some may be combined into a larger summary - the others not. Presently it's a bit of a rough and ready approach. Will finesse once functional. Thanks so much for your wise advice. RE: Printing to printer - Linux - LPRINT alternative? - grymmjack - 06-03-2023 (05-26-2023, 06:17 AM)desA Wrote: Hi everyone. Probably not ideal, but what about a virtual machine running windows and installing qb64 there? I know that VBox works with connected devices that are USB. Not sure in Linux. The VM would let you not have to worry about Wine or molesting your Linux OS. I use this pattern a lot. I use VirtualBox, and it's easy. Find an ISO of Windows (not hard at all) then install to VM. Done. RE: Printing to printer - Linux - LPRINT alternative? - desA - 06-04-2023 Overview of my approach to getting past the missing LPRINT command in Linux. 1. Within QB64 1.1 Convert LPRINT statements to print to file. 1.2 Launch external BASH script from QB64. 2. External BASH script 2.1 Convert text file to postscript. 2.2 Convert postscript to pdf. 3.4 Display pdf files. In the end, the pdf files are printed out (if necessary) and retained for design records. This turns out to be a far more elegant solution, in my view, RE: Printing to printer - Linux - LPRINT alternative? - Ultraman - 06-06-2023 Wow. Makes me wish that Kevin's my solution hadn't been expunged from the Wiki. The one that works in Linux. The one that allows for printing to a printer. With opening a TCP/IP connection to the printer on port 9100 and sending raw data. The one that goes something like this: Code: (Select All)
RE: Printing to printer - Linux - LPRINT alternative? - desA - 06-07-2023 (06-06-2023, 06:13 AM)Ultraman Wrote: Wow. Makes me wish that Kevin's my solution hadn't been expunged from the Wiki. The one that works in Linux. The one that allows for printing to a printer. With opening a TCP/IP connection to the printer on port 9100 and sending raw data. The one that goes something like this:@Ultraman Awesome approach. Thank you. |