MCPcopy Create free account
hub / github.com/LibPDF-js/core / getCreator

Method getCreator

src/api/pdf.ts:1216–1230  ·  view source on GitHub ↗

* Get the creator application. * * @returns The creator application, or undefined if not set

()

Source from the content-addressed store, hash-verified

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.

Callers 5

getMetadataMethod · 0.95
pdf.test.tsFile · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 4

asStringMethod · 0.80
getObjectMethod · 0.65
getRefMethod · 0.45
getStringMethod · 0.45

Tested by

no test coverage detected