[api-minor] Slightly shorten the marked-content ids used in the textLayer

Generally we try to keep the ids that we create short, hence we can slightly shorten the "static" parts of them.
This commit is contained in:
Jonas Jenwald 2023-05-18 22:23:42 +02:00
parent 04de155aaa
commit 8c4821ceda
4 changed files with 7 additions and 7 deletions

View File

@ -102,7 +102,7 @@ class Page {
}
static getPageObjId() {
return `page${ref.toString()}`;
return `p${ref.toString()}`;
}
};
}

View File

@ -3343,7 +3343,7 @@ class PartialEvaluator {
textContent.items.push({
type: "beginMarkedContentProps",
id: Number.isInteger(mcid)
? `${self.idFactory.getPageObjId()}_mcid${mcid}`
? `${self.idFactory.getPageObjId()}_mc${mcid}`
: null,
tag: args[0] instanceof Name ? args[0].name : null,
});

View File

@ -315,7 +315,7 @@ class StructTreePage {
) {
obj.children.push({
type: "content",
id: `page${kid.pageObjId}_mcid${kid.mcid}`,
id: `p${kid.pageObjId}_mc${kid.mcid}`,
});
} else if (kid.type === StructElementType.OBJECT) {
obj.children.push({

View File

@ -2745,7 +2745,7 @@ Caron Broadcasting, Inc., an Ohio corporation (“Lessee”).`)
children: [
{
role: "NonStruct",
children: [{ type: "content", id: "page2R_mcid0" }],
children: [{ type: "content", id: "p2R_mc0" }],
},
],
},
@ -2754,7 +2754,7 @@ Caron Broadcasting, Inc., an Ohio corporation (“Lessee”).`)
children: [
{
role: "NonStruct",
children: [{ type: "content", id: "page2R_mcid1" }],
children: [{ type: "content", id: "p2R_mc1" }],
},
],
},
@ -2763,7 +2763,7 @@ Caron Broadcasting, Inc., an Ohio corporation (“Lessee”).`)
children: [
{
role: "NonStruct",
children: [{ type: "content", id: "page2R_mcid2" }],
children: [{ type: "content", id: "p2R_mc2" }],
},
],
},
@ -2772,7 +2772,7 @@ Caron Broadcasting, Inc., an Ohio corporation (“Lessee”).`)
children: [
{
role: "NonStruct",
children: [{ type: "content", id: "page2R_mcid3" }],
children: [{ type: "content", id: "p2R_mc3" }],
},
],
},