@gohcltech/edge-print-client 2.0.73-develop → 2.0.81-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 +16 -0
- package/dist/edge-print.d.ts +15 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -265,6 +265,22 @@ 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
|
+
|
|
281
|
+
This describes Windows. On macOS the image is handed to the system print
|
|
282
|
+
system, which fits it to the page instead — the two converge in a later release.
|
|
283
|
+
|
|
268
284
|
#### Print examples
|
|
269
285
|
|
|
270
286
|
```ts
|
package/dist/edge-print.d.ts
CHANGED
|
@@ -125,7 +125,21 @@ 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.
|
|
139
|
+
*
|
|
140
|
+
* This applies on Windows. On macOS the image is handed to the system print
|
|
141
|
+
* system, which fits it to the page instead; the two converge in a later
|
|
142
|
+
* release.
|
|
129
143
|
*/
|
|
130
144
|
format: 'command' | 'pdf' | 'html' | 'image';
|
|
131
145
|
/**
|