How to get item object with in Ingester? (Automatic PDF creation)

I am currently working on a module that provides a new ingester in the admin backend under “Edit Item” (Route: admin/item/[ID]/edit). The goal is to automatically create a PDF from the images of an item.The PDF creation works so far, but not within the ingester, because I don’t know how to access the item object or its ID.

So far I try to access the item in my ingester and the function ingester(), but I can’t find a way to get the necessary data. What would be the solution? Here is an intermediate state as a picture, Yellow works, I need the orange Data:

When saving, I want a PDF to be created that contains all the images. Thanks for help

Hmm, we don’t have any ingesters that depend on the item, so we haven’t thought through this specific path much…

Well, I think it should be available: in all cases we should be setting the parent Item to the Media object before the ingester runs. So you should be able to get at the item by calling getItem() on the Media entity you’re passed.

You could also dig it out of the Request if you had to, since you get that passed also, but that shouldn’t be necessary.

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.