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

Method getProducer

src/api/pdf.ts:1251–1265  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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.

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