* Create a Form XObject (reusable content). * * @param options - Form XObject options including bbox and operators * @returns PDFFormXObject resource for use with page.registerXObject() * * @example * ```typescript * const stamp = pdf.createFormXObject({ * bbox: { x: 0, y:
(options: FormXObjectOptions)
| 2486 | * ``` |
| 2487 | */ |
| 2488 | createFormXObject(options: FormXObjectOptions): PDFFormXObject { |
| 2489 | const contentBytes = serializeOperators(options.operators); |
| 2490 | const stream = PDFFormXObject.createStream(options, contentBytes); |
| 2491 | |
| 2492 | const ref = this.register(stream); |
| 2493 | |
| 2494 | return new PDFFormXObject(ref, options.bbox); |
| 2495 | } |
| 2496 | |
| 2497 | // ───────────────────────────────────────────────────────────────────────────── |
| 2498 | // Attachments |
no test coverage detected