docs.rs failed to build yeib_print-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
yeib_print-0.1.2
🖨️ yeib_print
Fast, clean, zero-margin Win32 GDI direct document printing engine for Rust and Tauri on Windows.
Why yeib_print?
In desktop frameworks like Tauri on Windows, window.print() triggers the built-in WebView2 / Microsoft Edge print dialog. This introduces unwanted header/footer text (URLs, dates), forced margins, and poor UI cohesion.
yeib_print solves this by talking directly to the Windows Print Spooler via modern Win32 GDI (CreateDCW, StartDocW, StretchDIBits). You can design your own bespoke, branded print preview UI and dispatch the actual printing job silently or directly with full control over paper sizes, orientation, copies, and color modes.
✨ Features
- Direct GDI & Win32 Spooler Dispatch: High-resolution page rendering without browser dialogs or margin artifacts.
- Modern Windows Integration: Powered by Microsoft's official
windowscrate (0.62) without legacywinapioverhead. - Printer Enumeration: Discover installed printers, identify the system default printer, and retrieve port/driver information (
list_printers). - Rich DEVMODE Configuration: Configure paper sizes (
Letter,A4,Legal,A3,A5), orientation (Portrait,Landscape,Auto), copies, and collation. - Flexible Page Inputs: Accepts Base64 strings, Data-URIs (
data:image/png;base64,...), raw bytes, or image file paths. - Aspect-Ratio Fitting: Automatically centers and fits pages onto the target printable area without distortion.
- Page Range Parsing: Supports flexible range specs like
"all","1-3","1, 3, 5".
🚀 Quick Start
Add yeib_print to your Cargo.toml:
[]
= "0.1"
Basic Example
use ;
🌐 Tauri 2 Command Integration
use command;
use ;
pub async
pub async
📄 License
Dual-licensed under either:
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option.
Developed with ❤️ by Yeib.