Skip to content

Simple Rust program for printing envelops without the need for fancy word processing applications.

License

Notifications You must be signed in to change notification settings

paka63/envelope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Envelope Studio

A desktop application for designing and printing envelopes, built with Rust and Iced.

Envelope Studio

Features

  • Visual envelope preview with real-time updates
  • Multiple envelope sizes - #10, #9, #6¾, Monarch, DL, C5, C6, A2, A7, and custom sizes
  • Font customization - Family (Helvetica, Times, Courier), style (Regular, Bold, Italic), size, and alignment
  • Address Book - Save frequently used addresses for quick access
  • Recipient List - Build a list of recipients with checkbox selection for batch printing
  • Batch printing - Print multiple envelopes at once
  • PDF export - Export single or batch envelopes to PDF
  • CSV import - Import addresses from spreadsheet exports
  • Auto-save - Recipient list persists automatically (survives crashes)
  • Dark/Light theme - Toggle between themes
  • Unit toggle - Switch between millimeters and inches
  • Printer integration - Direct printing via CUPS/lp

Requirements

System

  • Linux with CUPS printing system (for direct printing)
  • macOS should also work (uses lp command)
  • Windows: PDF export works, but direct printing requires WSL or manual printing

Build Dependencies

  • Rust 1.75+ (uses 2024 edition features)
  • System libraries for Iced GUI:
    # Ubuntu/Debian
    sudo apt install libxkbcommon-dev libwayland-dev
    
    # Fedora
    sudo dnf install libxkbcommon-devel wayland-devel

Quick Start

1. Clone and Build

git clone https://github.com/yourusername/envelope.git
cd envelope
cargo build --release

2. Run

cargo run --release --bin envelope_ui

3. Basic Workflow

  1. Set your return address in the Addresses tab
  2. Enter a recipient address and click "Add to List"
  3. Repeat for additional recipients
  4. Select recipients using checkboxes (or click "All")
  5. Go to Printer tab and click "Print Selected" or "Export Selected"

4. Save Addresses for Later

  • Enter an address in the Recipient field
  • In the "Save to Address Book" section, enter a name
  • Click "Save Address"
  • Next time, just click the + button to add it to your print list

Configuration Files

The app creates these files in its working directory:

File Purpose
config.toml Printer settings, return address, layout preferences
address_book.toml Saved contacts (permanent)
recipients.toml Current recipient list (auto-saved)

Printer Settings

Orientation Issues?

If your envelope prints incorrectly oriented:

  1. Try "Rotate 90°" checkbox - swaps PDF dimensions for portrait-fed printers
  2. Try different Orientation settings (Portrait/Landscape/Reverse)
  3. Combine both if needed

Media Type

Select the appropriate envelope media type for your printer. Common options:

  • Envelope10 - US #10 business envelope
  • EnvelopeMonarch - Monarch size
  • EnvelopeDL - International DL

Keyboard Shortcuts

Key Action
Mouse wheel Zoom preview (when hovering over preview)

Project Structure

envelope/
├── src/
│   ├── lib.rs          # Core library (PDF generation, printing, data types)
│   ├── main.rs         # CLI entry point
│   └── bin/
│       └── envelope_ui.rs  # Iced GUI application
├── icons/              # SVG icons for the UI
├── envelope.svg        # Application icon
├── Cargo.toml          # Dependencies
└── README.md           # This file

Building Without GUI

The core library can be used without the GUI:

use envelope::{Config, EnvelopeLayout, print_envelope};

let config = Config::load()?;
let layout = EnvelopeLayout::no10();
print_envelope(&config, &layout)?;

License

MIT License - See LICENSE file for details.

Contributing

Contributions welcome! Please open an issue or pull request.

About

Simple Rust program for printing envelops without the need for fancy word processing applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages