MCPcopy
hub / github.com/Lulzx/tinypdf / addObject

Function addObject

src/index.ts:126–130  ·  view source on GitHub ↗
(dict: Record<string, PDFValue>, streamBytes: Uint8Array | null = null)

Source from the content-addressed store, hash-verified

124 let nextId = 1
125
126 function addObject(dict: Record<string, PDFValue>, streamBytes: Uint8Array | null = null): Ref {
127 const id = nextId++
128 objects.push({ id, dict, stream: streamBytes })
129 return new Ref(id)
130 }
131
132 function page(widthOrFn: number | ((ctx: PageContext) => void), heightOrUndefined?: number, fnOrUndefined?: (ctx: PageContext) => void): void {
133 let width: number

Callers 3

imageFunction · 0.85
pageFunction · 0.85
buildFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected