* Create and register a new dictionary.
(entries?: Record<string, PdfObject> | [string, PdfObject][])
| 1978 | * Create and register a new dictionary. |
| 1979 | */ |
| 1980 | createDict(entries?: Record<string, PdfObject> | [string, PdfObject][]): PdfRef { |
| 1981 | let dict: PdfDict; |
| 1982 | |
| 1983 | if (Array.isArray(entries)) { |
| 1984 | dict = new PdfDict(entries); |
| 1985 | } else if (entries) { |
| 1986 | dict = PdfDict.of(entries); |
| 1987 | } else { |
| 1988 | dict = new PdfDict(); |
| 1989 | } |
| 1990 | |
| 1991 | return this.register(dict); |
| 1992 | } |
| 1993 | |
| 1994 | /** |
| 1995 | * Create and register a new array. |
no test coverage detected