馃殌 New Features
Print Scale Control
- API Scale Parameter: All printing endpoints now accept an optional
scale parameter to control PDF scaling
- Scale Options:
noscale - Original size (default)
shrink - Shrink to fit printable area
fit - 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
noscale if 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
})
})