Skip to content

Add LeanPrint: foundation for a driverless FinePrint alternative - #1

Closed
azitc-ac wants to merge 1 commit into
mainfrom
claude/fineprint-alternative-windows-arm-4s7y23
Closed

azitc-ac wants to merge 1 commit into
mainfrom
claude/fineprint-alternative-windows-arm-4s7y23

Conversation

@azitc-ac

Copy link
Copy Markdown
Owner

Summary

Starts LeanPrint — a modern, lightweight, open-source alternative to FinePrint that pools print jobs, imposes them N-up (2-on-1, 4-on-1, booklet), previews them WYSIWYG, and forwards to a real printer. It is designed from day one to run on Windows on ARM (ARM64) as well as x64.

The key design decision: no third-party print driver. Windows is retiring third-party v3/v4 drivers (Windows Protected Print), and on ARM64 x64 print drivers aren't emulated at all — so a FinePrint-style virtual driver is a dead end. LeanPrint instead captures jobs via a loopback IPP service driven by the Microsoft in-box IPP class driver (user-mode, driverless, ARM64-native). Rationale in docs/ARCHITECTURE.md.

This PR is the first increment: the platform-neutral, unit-tested core. Nothing here talks to a printer yet — the Windows capture/render/app layers are scaffolded on the roadmap.

What's included

  • Domain model (LeanPrint.Core): SourcePage, PrintDocument, PrintJobPool — print-job pooling / "summarise print jobs".
  • Imposition engine:
    • NUpImposer — N-up grids (arbitrary rows × columns), margins, gutters, cell order (row/column-major), scale modes (fit / fill / stretch / actual size), and auto-rotate to maximise each page within its cell.
    • BookletImposer — saddle-stitch page reordering, padded to multiples of 4.
  • Geometry in PostScript points, top-left origin (documented; renderer converts to PDF's bottom-left later).
  • Tests: 21 xUnit tests covering N-up placement, ordering, rotation, margins/gutters, blanks, booklet ordering, and the model. Cross-platform (no Windows deps).
  • Docs: README, ARCHITECTURE (capture strategy + why driverless), ROADMAP (M0–M5).
  • CI: GitHub Actions workflow building/testing the core on push.

Verification

dotnet test (Debug and Release) — 21/21 passing on Linux with the .NET 8 SDK. The core is intentionally OS-neutral so this runs anywhere.

Layout

Path Description
leanprint/src/LeanPrint.Core Domain model + imposition engine (net8.0, no Windows deps)
leanprint/tests/LeanPrint.Core.Tests xUnit tests
leanprint/docs/ Architecture & roadmap
.github/workflows/leanprint-core.yml CI for the core

Notes for reviewers

  • Everything lives under leanprint/ and is fully separate from the existing unblock-Files.ps1 utility. It may make sense to eventually split LeanPrint into its own repository — happy to do that.
  • Licensed MIT; PDF rendering will use PDFium (BSD). Ghostscript/MuPDF (AGPL) are intentionally avoided to keep the project permissively licensed.

Next steps (see ROADMAP)

  • M1 — loopback IPP capture prototype (proves the only real technical risk).
  • M2 — PDFium rendering + WYSIWYG preview.
  • M3 — forward imposed sheets to a physical printer.

🤖 Generated with Claude Code


Generated by Claude Code

Start a modern, lightweight, open-source FinePrint alternative designed to
run on Windows on ARM (ARM64) as well as x64 by avoiding third-party print
drivers entirely (loopback IPP + in-box IPP class driver; see docs).

This first increment delivers the platform-neutral, unit-tested core:

- Domain model: SourcePage, PrintDocument, PrintJobPool (print-job pooling
  / "summarise print jobs").
- Imposition engine:
  - NUpImposer: N-up grids (2-on-1, 4-on-1, arbitrary rows x cols), margins,
    gutters, cell order (row/column major), scale modes (fit/fill/stretch/
    actual), auto-rotate to maximise page size within a cell.
  - BookletImposer: saddle-stitch page reordering, padded to multiples of 4.
- Geometry in PostScript points, top-left origin.
- 21 xUnit tests, green on Linux/macOS/Windows.
- Docs: README, ARCHITECTURE (capture strategy and why driverless), ROADMAP.
- CI workflow building/testing the core on push.

The Core has no Windows dependencies so it stays testable on any OS; the
Windows capture/render/app layers are scaffolded on the roadmap.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WaQweBHHGjM9uaKneNS1wu

Copy link
Copy Markdown
Owner Author

Closing: OpenLeanPrint now lives in its own dedicated repository at azitc-ac/OpenLeanPrint, where the same foundation has been pushed to main. This PR was only a temporary placement inside the unrelated ps-unblock-files repo and is superseded.


Generated by Claude Code

@azitc-ac azitc-ac closed this Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants