In my wife’s snackette, I use an Ubuntu desktop with Firefox to run the POS program. The program prints the receipt to a Munbyn ITPP047 thermal receipt printer.
The desktop was using Ubuntu 22.04, I don’t remember the version of Firefox. I did an upgrade to Ubuntu 24.04 and the printer stopped working. It would only print a short blank piece of paper. I decided to try the printer on an Arch machine with Budgie desktop and CUPS, and I received the same result.
Interestingly, a test page would print from CUPS fine. If I printed from LibreOffice no problem, but when printing from Firefox, Microsoft Edge, Chromium, Brave, Google Chrome, Pale Moon it would give me the same problem. It took me a few days but I found the problem to be the paper size definition. Therefore I modified the PPD for Munbyn and changed the 72mm X 210mm page to 210mm X 210mm. In Firefox I used a scale of 90 and voila it printed.
In this case what I found is that if the width of the paper was more than 8.5" or 216mm it would produce a very fine print. But the closer the paper width was to 215mm without going over, the closer to the left margin the print would get. Since I needed it to run from the browser, most importantly, I haven’t tested the effect of that paper size on any other software. And I suppose if the original paper size was needed, it would be easy to add.
This was a fascinating troubleshooting adventure and shows the intricate relationships between software, printer drivers and paper size definitions.
Notes
1. Paper Size Mismatch: It looks like the default paper size in the printer’s PPD (PostScript Printer Description) file was incompatible with how browsers handle print jobs. 2. Browser Rendering Differences: Browsers have their own print engines. If the paper size in the PPD doesn’t match the browser’s print rendering expectations, you get anomalies like blank short paper or misaligned prints. 3. CUPS Test Page vs. Applications: Since CUPS and LibreOffice worked, the core communication with the printer was fine. The issue was in how browsers interpreted the page size.
What Worked
Modifying the PPD to set paper size to 210mm x 210mm.
Setting print scale to 90% in Firefox to adjust the output dimensions.
This worked to balance the browser’s print handling with the printer’s expectations and produced output.
Width Limit: The very fine print when the width exceeded 216mm suggests the browser or printer firmware is defaulting to an internal rendering when the defined width exceeds its limit.
Alignment Shift: As the width approached 215mm the left margin adjustments could be an alignment compensation mechanism in the browser’s print engine or the printer’s firmware.
Test Across Applications: While this works for browser printing, it’s always a good idea to test printing from other applications like LibreOffice or PDF viewers to see if there are any unintended side effects from the new paper size.
Original Paper Size: If the original 72mm x 210mm paper size is needed in the future, add it back as an additional option in the modified PPD.
Takeaways
PPD Customization: Modifying PPD files can be a great way to fix printer problems when the standard settings don’t work.
Browser Specific: Browsers require more tweaks or adjustments than standalone applications because of their rendering pipelines.
Open-Source Tools: Using Linux and CUPS allowed us to debug and fix the issue. This shows the power of open-source ecosystems to be customizable.
You fixed the issue and learned more about thermal printers, browsers and PPDs. That’s what happens when you have custom hardware and software.