Repository navigation
Releases: Mavrag/microprint
Release list
Version 1.4.2
Added
- Custom in-app dialogs (
js/dialog.js) — replaces native Windows OS confirm/alert popups with dark-themed modals matching the app UI. Used for all destructive confirmations and error messages across History, Logs, and API Docs pages. - Working Clear History —
DELETE /print-historyserver endpoint added; button on History page now fully functional. Deletes all monthly stats files while preserving the migration marker. - Automated test suite (59 tests, no printer required) — Jest + Supertest covering:
monthlyStats.js: addPrintJob, getPrintHistory, getStatisticsForDateRange, getAvailableMonths, getMonthlyReport, clearHistory, migrateFromPrintHistoryconfigStore.js: defaults, get/set, persistenceserver.js: all API routes including pagination, filtering, and clear
Changed
- History page pagination — loads 100 records at a time with a "Load More" button instead of fetching all records at once (was loading 25k+ records into memory). Type/status filters are server-side; date filters apply client-side on loaded records.
- History page summary stats — Total Jobs / Successful / Failed counters now pulled from
/statisticsfor accurate all-time totals regardless of what page of records is loaded. /print-historyAPI — now acceptslimit,offset,documentType,statusquery parameters and returnstotalandhasMorealongside the jobs array.- Status & History pages — 3-card indicator rows now forced to a single row (
repeat(3, 1fr)) with compact sizing; previously the third card would wrap to a second row.
Internal / Developer
- Refactored
server.js: moved all Express routes intocreateExpressApp()and exported it for testing — no production behaviour change. - Added
__mocks__/electron.jsandjest.config.jsfor test infrastructure.
MicroPrint 1.3.3 – Reliable Label Scaling & API Cleanup
-
Reliable label shrink‑to‑fit
- All label prints now go through SumatraPDF with
paperkind=256,shrink, matching the known‑good CLI behavior. - Applies to both URL (
POST /print-url) and base64 (POST /print-data) label flows.
- All label prints now go through SumatraPDF with
-
Consistent across dev and installed builds
- New resolveSumatraPath() helper locates Sumatra from:
- Dev:
node_modules\pdf-to-printer\dist\SumatraPDF-3.4.6-32.exe - Packaged app:
resources\app.asar.unpacked\node_modules\pdf-to-printer\dist\SumatraPDF-3.4.6-32.exe - Plus standard
Program Files\SumatraPDF\SumatraPDF.exelocations.
- Dev:
- New resolveSumatraPath() helper locates Sumatra from:
-
Label options simplified
- For
documentType: "label", APIscale/paperSizeare ignored; labels always use a fixed shrink‑to‑fit label mode. - Invoices and generic PDFs still honor
scale(noscale/shrink/fit) andpaperSize.
- For
-
API surface and docs cleanup
- Removed legacy and unused endpoints:
/print,/print-both/pdf-list,/sample-pdfs/api/status,/history,/stats,/api-docs,/api-examples,/status-check,/test
- api-docs.html now documents only:
POST /print-url,POST /print-dataGET /printers,GET /settings,POST /settingsGET /status,GET /print-history,GET /statistics
- Docs explicitly note that labels always use
paperkind=256,shrinkinternally.
- Removed legacy and unused endpoints:
MicroPrint v1.3.1
🔧 Critical Fixes
─────────────────
-
Windows 10 Printer Enumeration
- Fixed critical bug where pdf-to-printer library failed on specific Windows 10 builds
- Implemented PowerShell Get-Printer as primary enumeration method
- Added PowerShell Get-WmiObject as secondary fallback for older Windows 10 versions
- Resolved "Cannot read properties of undefined (reading 'match')" errors
- Successfully detects all 10 printers on problematic Windows 10 machines
-
Status Page Compatibility
- Fixed JavaScript errors preventing status page from loading
- Added all required response fields: indicators, readiness, server, port
- Status page now works correctly on all Windows versions
- Proper error handling and fallback status reporting
⚡ Performance Optimizations
────────────────────────────
-
Lightning-Fast Printer Loading
- Reduced PowerShell command timeout from 10 seconds to 3 seconds (70% improvement)
- Added -Compress flag to PowerShell commands for faster JSON parsing
- Implemented intelligent 30-second printer cache system
- Subsequent page loads now complete in ~50ms (99% faster than before)
-
Performance Metrics
- Initial printer load: 5+ seconds → ~3 seconds (40% faster)
- Cached printer load: 5+ seconds → ~50ms (99% faster)
- Status page response: Under 100ms with cached data
🎯 User Experience Improvements
──────────────────────────────
-
Main Page Redirection
- http://localhost:9000/ now redirects to status page instead of API documentation
- Users immediately see system health and printer status
- Better first-time user experience with immediate feedback
- API documentation still accessible via /api-docs route
-
Smart Print Defaults
- Default scale: noscale (preserves original PDF formatting)
- Default paper size: None specified (uses printer default settings)
- Only includes non-default parameters in print commands
- Optimized parameter validation reduces unnecessary options
🛠️ Technical Enhancements
─────────────────────────
-
Robust Error Handling
- Comprehensive fallback chain: PowerShell → WMI → pdf-to-printer library
- Detailed debug logging for troubleshooting printer issues
- Graceful degradation when enumeration methods fail
- Enhanced error messages for better user guidance
-
API Improvements
- All print endpoints now use consistent parameter validation
- Smart parameter handling only includes non-default values
- Better error responses with actionable messages
- Maintained backward compatibility with existing integrations
📊 Impact Summary
─────────────────
| Feature | Before | After | Improvement |
|---|---|---|---|
| Windows 10 Detection | ❌ Failed | ✅ 10 printers | Fixed |
| Settings Page Load | 5+ seconds | ~3 seconds | 40% faster |
| Cached Page Load | 5+ seconds | ~50ms | 99% faster |
| Status Page Reliability | ❌ JavaScript err | ✅ Works perfectly | Fixed |
| Main Page Experience | API docs | System status | Better UX |
🔄 Upgrade Instructions
────────────────────────
- Download: MicroPrint-Setup-1.3.1.exe
- Install: Run installer (automatic upgrade from previous versions)
- Verify: Visit http://localhost:9000/ to see status page
- Configure: Settings page will load printers instantly after first use
──────────────────
- No configuration migration required - all settings preserved
- Chrome extension compatibility maintained
- API endpoints remain backward compatible
- Printer cache automatically refreshes every 30 seconds
- First printer enumeration after upgrade may take up to 3 seconds
🐛 Issues Resolved
─────────────────
- #142 Windows 10 printer enumeration failure
- #145 Status page JavaScript errors
- #148 Slow settings page loading
- #151 Poor main page user experience
- #153 Inconsistent print parameter handling
📦 Package: MicroPrint-Setup-1.3.1.exe (~920KB)
🔗 Compatible: Windows 10/11, Chrome Extension v1.3.1
⚡ Performance: 99% faster cached loading, 40% faster initial load
v1.3.0: Add Scale Control for PDF Printing
🚀 New Features
Print Scale Control
- API Scale Parameter: All printing endpoints now accept an optional
scaleparameter to control PDF scaling - Scale Options:
noscale- Original size (default)shrink- Shrink to fit printable areafit- Stretch/shrink to fit entire paper
Updated Endpoints
POST /print-url-{ url, documentType, copies, scale }POST /print-data-{ pdfBase64, documentType, copies, scale }POST /print-{ url, scale }POST /print-both-{ invoiceUrl, labelUrl, invoiceScale, labelScale }
📚 Documentation
- Updated API documentation with scale parameter examples
- Added scale selection to testing interface
- Enhanced code examples with scale usage
🔧 Technical Details
- Fully backward compatible - defaults to
noscaleif not specified - Invalid scale values gracefully fall back to
noscale - No changes required to existing integrations
💡 Example Usage
fetch('http://localhost:9000/print-url', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
url: '[https://example.com/invoice.pdf'](https://example.com/invoice.pdf'),
documentType: 'invoice',
scale: 'fit' // New parameter
})
})MicroPrint v1.2.1 - System Status & Enhanced Documentation
🩺 New System Status Page
MicroPrint now includes a real-time health monitoring dashboard:
- Live Status Checks - Server, configuration, and printer availability at a glance
- Collapsible Sections - Organized details with smooth animations
- Auto-Refresh - Optional 5-second auto-refresh for continuous monitoring
- Raw JSON Viewer - Toggle detailed API response for debugging
📚 Enhanced API Documentation
- Complete Endpoint Reference - All 9 API endpoints now documented
- Organized Categories - Printing, Configuration, Monitoring, and Utility sections
- Styled Cards - Visual HTTP method badges (GET/POST) with endpoint details
- Easy Integration - Clear request/response formats for external tools
🎨 UI/UX Improvements
- Better Error Display - Scrollable, contained error messages in History and Statistics
- Statistics Page - Job items now have subtle backgrounds for better visual separation
- Sticky Navigation Fix - Content no longer hides behind the menu when scrolling
- Browser Detection - Helpful warning when pages opened outside the app
🐛 Bug Fixes
- Fixed content jumping behind sticky navigation menu
- Error messages now properly wrap and scroll instead of breaking layout
- Dark theme error styling consistent across all pages
Installation: Download MicroPrint-Setup-1.2.1.exe and run the installer.
Upgrade Note: Existing users can install over v1.2.0. All settings and data will be preserved.
What's Next: Check out the new Status page in the navigation menu to monitor your MicroPrint system health!
MicroPrint v1.2.0 - Frameless UI Redesign & Log Filtering
🎨 Major UI Redesign
MicroPrint now features a frameless window design with a modern, clean interface:
- Collapsing Header Navigation - Logo scrolls away while menu sticks to the top
- Custom Close Button - Fixed in top-right corner, always accessible
- Auto-Hide to Tray - Window minimizes when clicking outside (file dialogs handled properly)
- Optimized Layout - Fixed-size, unresizable window for consistent UX
✨ New Features
- Log Filtering - Filter system logs by level (Info, Warning, Error, Debug) for easier troubleshooting
🎯 UI/UX Improvements
- Refined Print History layout with header buttons and subtitle
- Consistent button styling and centering across all pages
- Better spacing in Application Settings
- Enhanced card header spacing throughout
- Modern tab styling matching navigation menu
- Improved list formatting in cards
🔧 Improvements
- Better overall consistency and polish across the application
Installation: Download MicroPrint-Setup-1.2.0.exe and run the installer.
Upgrade Note: Existing users can simply install over their current version. Settings and preferences will be preserved.
MicroPrint v1.1.2 - Bug Fixes
MicroPrint v1.1.2
Bug fix release improving update error handling.
What's Fixed
Better Update Error Messages
- Clean, user-friendly error messages when update checks fail
- Users see simple messages like "Update server not available" or "No internet connection"
- Technical details logged to file for troubleshooting
- Startup update checks fail silently without bothering the user
- Fixed issue where app would show same version as an available update
Upgrading
If you're on v1.1.1, the in-app updater will detect this release automatically. Just click the refresh icon in the footer to check for updates.
MicroPrint v1.1.1 - PDF Printing Server
MicroPrint v1.1.1
MicroPrint is a local print server that enables automatic printing of invoices and labels from web applications.
Features
Print from URLs or Base64 Data
- Simple REST API endpoints for printing PDFs
- Support for both direct PDF URLs and Base64-encoded data
- Automatic printer selection based on document type (invoice/label)
Print History & Statistics
- Complete history of all print jobs with filtering
- Real-time statistics dashboard
- Track success rates, printer usage, and document types
System Tray Integration
- Runs quietly in the background
- Quick access to settings and logs
- Optional Windows startup integration
Automatic Updates
- Built-in update checker
- One-click download and install
- Always stay up to date
Installation
- Download
MicroPrint-Setup-1.1.1.exe - Run the installer
- Configure your printers in settings
- Access the API at
http://localhost:9000
API Endpoints
POST /print-url- Print from PDF URLPOST /print-data- Print from Base64 PDF dataGET /print-history- View print historyGET /statistics- View usage statistics
Full API documentation available at http://localhost:9000/api-docs