@gohcltech/edge-print-client 2.0.73-develop → 2.0.86-develop
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/dist/edge-print.d.ts +11 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -265,6 +265,19 @@ Each item in the array is one unit of content (page, label, etc.).
|
|
|
265
265
|
| `data` | `string` | The content, encoded per `flavor` |
|
|
266
266
|
| `options` | `Record<string, unknown>?` | Format-specific options forwarded to the agent renderer |
|
|
267
267
|
|
|
268
|
+
#### Image sizing
|
|
269
|
+
|
|
270
|
+
An image prints at its **intrinsic physical size**, taken from the resolution
|
|
271
|
+
its file declares — PNG `pHYs`, JFIF density, or EXIF resolution.
|
|
272
|
+
|
|
273
|
+
**A file that declares no resolution is assumed to be 96 DPI.** That assumption
|
|
274
|
+
decides the printed size, so it is worth knowing: a 1200 x 600 PNG with no
|
|
275
|
+
resolution metadata prints at 12.5 x 6.25 inches rather than being sized to the
|
|
276
|
+
paper. Send a file that declares its resolution if you need a specific size.
|
|
277
|
+
|
|
278
|
+
An image too large for the sheet is scaled down to fit and the job reports a
|
|
279
|
+
`content_scaled_to_fit` warning; nothing is silently cropped.
|
|
280
|
+
|
|
268
281
|
#### Print examples
|
|
269
282
|
|
|
270
283
|
```ts
|
package/dist/edge-print.d.ts
CHANGED
|
@@ -125,7 +125,17 @@ export interface PrintData {
|
|
|
125
125
|
* - `'command'` — raw printer command language
|
|
126
126
|
* - `'pdf'` — Portable Document Format
|
|
127
127
|
* - `'html'` — HTML markup (agent renders to pixels)
|
|
128
|
-
* - `'image'` — raster image (PNG, JPEG,
|
|
128
|
+
* - `'image'` — raster image (PNG, JPEG, BMP, GIF, WebP)
|
|
129
|
+
*
|
|
130
|
+
* **Image sizing.** An image prints at its intrinsic physical size, taken
|
|
131
|
+
* from the resolution its file declares — PNG `pHYs`, JFIF density, or EXIF
|
|
132
|
+
* resolution. **A file declaring none is assumed to be 96 DPI**, so a
|
|
133
|
+
* 1200 x 600 PNG with no resolution metadata is treated as 12.5 x 6.25
|
|
134
|
+
* inches rather than being sized to the paper. If that is not what you want,
|
|
135
|
+
* send a file that declares its resolution.
|
|
136
|
+
*
|
|
137
|
+
* An image too large for the sheet is scaled down to fit, and the job
|
|
138
|
+
* reports a `content_scaled_to_fit` warning.
|
|
129
139
|
*/
|
|
130
140
|
format: 'command' | 'pdf' | 'html' | 'image';
|
|
131
141
|
/**
|