* Get the producer application. * * @returns The producer application, or undefined if not set
()
| 1249 | * @returns The producer application, or undefined if not set |
| 1250 | */ |
| 1251 | getProducer(): string | undefined { |
| 1252 | const infoRef = this.ctx.info.trailer.getRef("Info"); |
| 1253 | |
| 1254 | if (!infoRef) { |
| 1255 | return undefined; |
| 1256 | } |
| 1257 | |
| 1258 | const info = this.ctx.registry.getObject(infoRef); |
| 1259 | |
| 1260 | if (!(info instanceof PdfDict)) { |
| 1261 | return undefined; |
| 1262 | } |
| 1263 | |
| 1264 | return info.getString("Producer")?.asString(); |
| 1265 | } |
| 1266 | |
| 1267 | /** |
| 1268 | * Set the producer application. |
no test coverage detected