* Get the creator application. * * @returns The creator application, or undefined if not set
()
| 1214 | * @returns The creator application, or undefined if not set |
| 1215 | */ |
| 1216 | getCreator(): string | undefined { |
| 1217 | const infoRef = this.ctx.info.trailer.getRef("Info"); |
| 1218 | |
| 1219 | if (!infoRef) { |
| 1220 | return undefined; |
| 1221 | } |
| 1222 | |
| 1223 | const info = this.ctx.registry.getObject(infoRef); |
| 1224 | |
| 1225 | if (!(info instanceof PdfDict)) { |
| 1226 | return undefined; |
| 1227 | } |
| 1228 | |
| 1229 | return info.getString("Creator")?.asString(); |
| 1230 | } |
| 1231 | |
| 1232 | /** |
| 1233 | * Set the creator application. |
no test coverage detected