Add RFC for using Text-Services for PDF generation - #1230
Conversation
|
I think some of the problem/complexity is that to us it's still a PDF... it still looks exactly the same as the DLCS old version, at least at first. But it's actually a completely different thing - it's a textual thing that happens to have images. So it's not like the NQ it was before, which is just a (tweaked) projection of assets into a PDF. We need that too, but can't do it without also having something completely new, the protobuf word map which hasn't come from assets at all but has come from additional files, and we need that before we can start building the PDF; it's the new presence of text that drives the architecture change. If DDS or Delft equivalent drove the text services API (ignoring for a moment how we access-control that), it could assemble the fireball-like job JSON sourceData with direct references to the ALTO files at s3: URIs, which don't ever need to be adjuncts. But Orchestrator doesn't know anything about those alto files in S3; if Orchestrator assembles the job JSON the only place it can learn about the ALTO files is if they have been registered as adjuncts on assets, that's all it knows about in DLCS-land, anything else is outside its knowledge. DLCS doesn't need to store them (their bytes), they can be external; but they do need to be rows in the adjuncts table. Whether orchestrator or DDS-equivalents drive construction is a trade-off, and Orchestrator wins I think because of the auth enforcement. Yes, we'll be storing asset->adjunct relationships in the DB even when we're assembling Manifests externally, like Wellcome or Delft but we have to convey the information somehow and this doesn't seem like a bad thing to have stored (and queryable). In the Proposal sequence diagram, what is Orchestrator sending for "Upsert text-builder job" - the "Find all images to be included" still has bespoke rules about what roles can be included and that access needs to be enforced on the generated PDF in scenarios where it has (eg) clickthrough assets present and visible. |
|
TOCs I'm not sure that the NQ can handle arbitrary-depth nested TOCs, and having to have matching strings getting back into the s2 field (for example) to capture the ranges seems very fragile, any one asset would break it. If the job is supplied to text services as a manifest then obviously it can translate any ranges to the PDF TOC. And we could extend the fireball-like JSON job format sourceData to include a similar How would Wellcome or similar non iiif-p PDFs get arbitrary |
|
(very sketchy idea coming up... not saying it's a good idea) if there's a {
"assetOrder": "n1,n2",
"s1": "p1",
"p1": "b1234", // hydrated, specific
"assets": [
"2/5/image1",
"2/5/image2",
"2/5/image3",
"2/5/image4",
"2/5/image5",
]
}service receives this, asks itself "OK what's the structure arrangement for the assets in b1234?" returns {
"assetOrder": "n1,n2",
"s1": "p1",
"p1": "b1234",
"toc": [
{
"label": "Table of Contents",
"items": [
{
"label": "Glasgow",
"assets": [
"2/5/image1",
"2/5/image2",
"2/5/image3",
]
},
{
"label": "London",
"assets": [
"2/5/image4",
"2/5/image5"
]
}
]
}
]
} hmm... |
What does this change?
Adds new RFC looking at how we can use text-services for PDF generation from NQs.
There are a couple of areas specifically called out for review, so RFC will need revisited once review has been carried out.