Since I learned about it, I have been absolutely fascinated by RAID. The ideaology of taking TWO hard drives and making ONE out of it? That is awesome to me. The week we learned about it in my college Systems Administration class, I went home and built a Windows Storage Space of two 4TB hard drives I had laying around to make a NAS. Take a wild guess what moronic thing I put those in? RAID 1. I used this as a primary backup location for every single computer in my house. I quickly filled up almost 3.4TB of data backing up everything in my life. And then, I decided to add two more drives so I could make a RAID 10 (Which, objectively, is the best RAID) and thought I could just convert it to RAID 10 from RAID 1. Instead, I lost everything and the drives formatted. Moral of this story? I still think RAID is awesome, and I also think I am an idiot when it comes to that stupid NAS.
I started pondering one day: What if other devices could be put in RAID? I think somewhere I made a list, but that list was completely stupid theoretical arrays that would do nothing but be a waste of time and space. Until, I thought about printers. What if, you could send a 20 page print job to an array of printers, and two printers equally divide the print job to print at double the speed?
This idea became what I now call PLAID Printing: Parallel Linked Array of Interconnected Devices. Also, plaid as a pattern, is striped, and so is the data being printed across devices. Don't worry, my level of creativity is always this high.
Anyways, PLAID printing started out as a question of what programming language it would be written in. I, being a current Cybersecurity student, have zero experience in Python (My college taught me SQL, Java, C#, and C, but didn't touch Python), but discovered it was the easiest language to touch physical printers using the Win32print operation. With the loving assistance of Microsoft Copilot, even though I resent using AI for projects like this, we were able to get a prototype script written. The problem? Sending a PDF to the two printers I was using, both attached by USB, would indefinitely pend in the IDLE window. After adding some debug solutions, I discovered that most of my code executed just fine, but the printers got stuck trying to initialize. Figuring that step out set me back a few hours, but eventually it was figured out I was trying to use an older version of a dependency that the PDF tool needed (If PyPDF is so good, why isn't there a PyPDF2-- Wait a second) and the printers weren't seeing a document.
I thought all of my problems would go away after this simple fix, but NOPE! Somehow they got worse. The print job would error out entirely when attempting to print, saying that there was no specified document type. Some Copiloting later, I found I was not passing enough parameters to the printers about the documents. I had to pass a pDocName for the name of the print job, a pOutputFile for an output (Which, in this case, was none), and a pDatatype, which was RAW. Once this hellscape of everything was out of the way, I had *finally* spun two printers up, and suddenly the first 10 pages of The Great Gatsby printed off, with 5 pages going to printer 1 and the other 5 going to printer 2.
So how does the code work? That is a fantastic question honestly. I am awful at explaining how code works, especially when what works was a combination of me and not me (Still, thank you Copilot for actually making this functional ugh, even though I am not happy about your involvement). The code starts out asking for a file. This was so I could input The Great Gatsby's PDF as my file parameter. The code then executes a "find_printers" function that finds what printers are attached to the computer using the win32print dependency. It then adds the printer object to an array of printers. The next step is the "split_pdf" function, which finds the midpoint of a PDF file's page count, and sets "outputA" and "outputB" to the first and second half of the PDF, respectively. These split PDFs are made into temp PDFs, that will be deleted after the print job completes. Finally, the "plaid_print_start" function runs with the split print jobs being sent to the printers. I have two different functions for this section, one that uses Multiprocessing that has been a bit of a loose cannon that Copilot wrote, and a much simplier version I wrote that sends both jobs almost sequentially, but still print simultaneously.
I know the question you're dying to have answered: Does this in fact print faster? The answer is YES! I timed printing off 10 pages on one of the duplicate printers I had available to test with, and it took almost 40 seconds to print. With the PLAID printing in play, printers warming up and all, took about 21.98 seconds, almost halved print time. Look at me now, mom!
So, do you want a copy of this awful, stupid, ridiculous project? I have a download of the raw code below. Please note that PLAID printing is not copyrighted in any way, nor do I plan on pursuing a practical usecase for it. If you can come up with a reason that validates its existance and allows it to be used for something more than printing off The Great Gatsby, great! Just credit me, and if you make money on it send me enough I can eat every now and then.
Download Project File