These host‑based LaserJet models have no 64‑bit Windows driver available, and
Windows 11 includes no inbox driver for them. The older
lj1010seriesprnsyswin-en.exe package contains 32‑bit drivers, which do not
install on 64‑bit Windows.
This project prints to the printer without any HP driver by generating the printer's native page language ourselves and streaming it to the USB port.
Ready-to-run builds are on the Releases page (not in the source tree above):
- LaserJet1012Studio-Setup.exe — installer (recommended)
- LaserJet1012Studio.exe — portable, no install
Requires 64-bit Windows 10/11. First launch is unsigned → SmartScreen: More info → Run anyway.
These printers have no PostScript/PCL‑XL interpreter. They accept only a PJL‑wrapped PCL 5e raster stream (they reject PCL‑XL/PCL6 with "Unsupported Personality"). So the pipeline is:
content ──▶ GDI renders a 1‑bit‑per‑pixel page (src/gdi.py, real Windows fonts)
──▶ encode as PJL + PCL 5e raster (src/pcl5e.py, PackBits compressed)
──▶ spool RAW to the printer (src/rawprint.py, ctypes winspool)
Everything uses the Python standard library only — no Pillow, no pywin32.
| File | Purpose |
|---|---|
src/pcl5e.py |
PCL 5e raster encoder (PJL wrapper, PackBits). Platform‑independent. |
src/gdi.py |
Monochrome page canvas backed by Windows GDI (text, lines, boxes). |
src/rawprint.py |
Send RAW bytes to a print queue via the spooler (ctypes). |
src/render.py |
Shared page geometry + canvas building (used by CLI and GUI). |
src/imaging.py |
Save a canvas as PNG (stdlib) for previews / QA. |
src/testpage.py |
A diagnostic test page (border, ruler, font + fill tests). |
src/pmgmt.py |
Printer management (install/uninstall, status, queue) via Windows cmdlets. |
src/app.py |
Desktop GUI (tkinter): Print tab + Printer tab. |
src/lj1012.py |
Command‑line front end. |
setup_queue.ps1 |
One‑time: create a RAW pass‑through queue on the USB port. |
Run from source:
py src\app.pyTwo tabs, standard library only — nothing to install:
- Print — test page / type text / open a file, paper & font options, a live preview, and Print / Save PCL.
- Printer — Install and Uninstall the printer (one admin prompt), device + queue status, Pause/Resume, a live print‑queue view with Cancel selected / Clear all, and a shortcut to Windows printer settings.
py -m pip install --user pyinstaller
.\build.ps1Produces dist\LaserJet1012Studio.exe — a self-contained ~11 MB program that
runs with no Python installed. Double-click it, or use the Desktop / Start Menu
shortcut. icon.ico is the app icon; build.ps1 is the packaging script.
Easiest: download LaserJet1012Studio-Setup.exe from the
Releases page and
run it — a standard setup wizard that installs to Program Files, adds shortcuts,
and registers an uninstaller in Control Panel → Programs and Features.
Uninstall it the normal way from there.
To build the installer yourself (after build.ps1), compile the Inno Setup
script (installer/lj1012.iss) with Inno Setup:
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" installer\lj1012.iss
That produces dist\LaserJet1012Studio-Setup.exe.
The RAW queue that carries our bytes to the printer must be created once, and that needs administrator rights:
# Run elevated (right‑click > Run as administrator)
powershell -ExecutionPolicy Bypass -File setup_queue.ps1This creates a queue named LJ1012 (Raw) using the inbox
"Generic / Text Only" driver on port USB001. To remove it later:
setup_queue.ps1 -Remove.
# List local queues (find the exact name)
py src\lj1012.py list
# Print the diagnostic test page
py src\lj1012.py --printer "LJ1012 (Raw)" testpage
# Print a string or a text file
py src\lj1012.py --printer "LJ1012 (Raw)" text "Hello, LaserJet 1012!"
py src\lj1012.py --printer "LJ1012 (Raw)" textfile notes.txt
# Omit --printer to just write the PCL to a file for inspection
py src\lj1012.py --out job.pcl testpageUseful options: --paper letter|legal|a4, --dpi 600, --font "Times New Roman",
--size 12, --compress packbits|none.
The PCL 5e encoder is shared; on Linux the page is rendered with Pillow and sent straight to the printer — no HP driver, and CUPS is optional.
pip install pillow
python3 linux/lj1012.py list # find /dev/usb/lp* and CUPS queues
python3 linux/lj1012.py testpage # -> /dev/usb/lp0 (default)
python3 linux/lj1012.py text "Hello, 1012!" --cups LJ1012
python3 linux/lj1012.py image photo.png --out job.pcl
python3 linux/lj1012.py raw job.pcl # send an already-encoded .pclSend targets: --device /dev/usb/lp0 (default), --cups NAME (lp -o raw), or
--out file.pcl. If the device needs permissions, add yourself to the lp
group (sudo usermod -aG lp $USER, then re-login) or use sudo. The
render/encode pipeline is tested; the on-hardware send path is untested —
reports welcome.
| OS | Status |
|---|---|
| Windows 11 | ✅ Supported (developed/tested here) |
| Windows 10 | ✅ Should work — same Win32 APIs, inbox "Generic / Text Only" driver, and printer cmdlets. Untested on real hardware. |
| Linux | 🧪 Beta CLI (linux/lj1012.py): renders via Pillow, reuses the shared encoder, sends raw to /dev/usb/lp0 or CUPS. Render + encode verified; the on-hardware send is untested. |
| macOS | ❌ Not supported. Could work like the Linux CLI (CUPS lp -o raw); untried. |
- Local-only. No network access, no telemetry, no accounts, no secrets. It talks only to the local print spooler and the USB printer.
- No injection surface. Management commands use a fixed queue name; the user-chosen printer goes through the Win32 API, not a shell.
- Elevation. Installing/uninstalling the printer queue and the program needs administrator rights (creating a print queue / writing to Program Files). The scripts are plain text and self-elevate with a single UAC prompt.
- Unsigned. The
.exeand scripts are not code-signed, so Windows SmartScreen may warn on first run ("More info → Run anyway").
- PCL 5e raster encoder with PackBits compression
- GDI page renderer (real fonts, lines, boxes) — verified via PNG preview
- RAW spooler output
- CLI:
list,testpage,text,textfile - Desktop GUI app (status, setup, preview, print)
- Printer management: install / uninstall / status / queue (cancel, clear, pause)
- Packaged as a standalone .exe with icon + shortcuts
- Installer: Program Files + Programs and Features entry + uninstaller
- First physical print confirmed on hardware
- Image printing (needs Pillow or a stdlib decoder)
- PDF printing (needs a rasterizer such as pdfium/Ghostscript)
- Optional: a real "virtual printer" any app can print to
This is an independent, unofficial open-source project. It is not affiliated with, authorized by, endorsed by, or sponsored by HP Inc. or any of its subsidiaries.
"HP", "LaserJet", and related names are trademarks of HP Inc. They are used here only to identify the printer hardware this software is compatible with (nominative fair use) — not to imply any association or endorsement. All trademarks and product names belong to their respective owners.
This project ships no HP software, drivers, or firmware. It generates a
standard page-description stream (PCL 5e) using original code. The referenced
lj1010seriesprnsyswin-en.exe is HP's own package and is not distributed
here.
The software is provided "AS IS", without warranty of any kind, and you use it at your own risk (see LICENSE and SECURITY.md).