Clean repository and update .gitignore
- Remove build artifacts from git tracking (build/, dist/, __pycache__/, *.spec) - Updated .gitignore to properly exclude generated files - Added old_code/ documentation folder - Updated sample_data.txt to show new 5-field format - Exclude user-specific conf/app.conf from tracking
This commit is contained in:
67
old_code/check_printer_quality.ps1
Normal file
67
old_code/check_printer_quality.ps1
Normal file
@@ -0,0 +1,67 @@
|
||||
# Check and configure printer quality settings for Labels printer
|
||||
|
||||
$printerName = "Labels"
|
||||
|
||||
Write-Host "=== Checking Printer: $printerName ===" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
# Get printer object
|
||||
$printer = Get-Printer -Name $printerName -ErrorAction SilentlyContinue
|
||||
|
||||
if ($null -eq $printer) {
|
||||
Write-Host "ERROR: Printer '$printerName' not found!" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "Printer Name: $($printer.Name)" -ForegroundColor Green
|
||||
Write-Host "Driver Name: $($printer.DriverName)" -ForegroundColor Green
|
||||
Write-Host "Port Name: $($printer.PortName)" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
|
||||
# Get printer configuration
|
||||
try {
|
||||
$printerConfig = Get-PrintConfiguration -PrinterName $printerName
|
||||
Write-Host "=== Current Print Configuration ===" -ForegroundColor Cyan
|
||||
Write-Host "Print Quality: $($printerConfig.PrintQuality)"
|
||||
Write-Host "Color Mode: $($printerConfig.Color)"
|
||||
Write-Host "Duplex Mode: $($printerConfig.DuplexingMode)"
|
||||
Write-Host ""
|
||||
} catch {
|
||||
Write-Host "Could not retrieve print configuration: $_" -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
# Get printer driver properties
|
||||
Write-Host "=== Checking Printer Properties ===" -ForegroundColor Cyan
|
||||
try {
|
||||
$printerProperties = Get-PrinterProperty -PrinterName $printerName
|
||||
foreach ($prop in $printerProperties) {
|
||||
Write-Host "$($prop.PropertyName): $($prop.Value)"
|
||||
}
|
||||
} catch {
|
||||
Write-Host "Could not retrieve printer properties: $_" -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "=== Recommendations ===" -ForegroundColor Cyan
|
||||
Write-Host "1. Open Windows Settings > Devices > Printers & scanners"
|
||||
Write-Host "2. Click on 'Labels' printer"
|
||||
Write-Host "3. Click 'Manage' > 'Printing preferences'"
|
||||
Write-Host "4. Look for quality settings and set to:"
|
||||
Write-Host " - Print Quality: Best/Highest/600 DPI or higher"
|
||||
Write-Host " - Graphics Mode: Vector or High Quality"
|
||||
Write-Host " - Dithering: None (for sharp text)"
|
||||
Write-Host "5. Save settings and try printing again"
|
||||
Write-Host ""
|
||||
Write-Host "Would you like to try setting print quality to high? (Y/N)" -ForegroundColor Yellow
|
||||
$response = Read-Host
|
||||
|
||||
if ($response -eq 'Y' -or $response -eq 'y') {
|
||||
try {
|
||||
# Try to set print quality to high
|
||||
Set-PrintConfiguration -PrinterName $printerName -PrintQuality 4 # 4 = High quality
|
||||
Write-Host "Print quality set to HIGH" -ForegroundColor Green
|
||||
} catch {
|
||||
Write-Host "Could not set print quality automatically: $_" -ForegroundColor Yellow
|
||||
Write-Host "Please set manually through printer preferences" -ForegroundColor Yellow
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user