Extract PDF layout
pdf_layout_fetch · Built-in action recipeExtract text and layout from a PDF asset with spacy-layout and Docling, and save as a Layout asset for fast annotation with PDF Span Annotation.
If you've connected Ellf to your coding assistant, it can set up the action for you: it knows the recipe's settings, can create the datasets and assets it needs and will ask you about anything it can't work out itself.
✳︎Claude Code: Setting up an action
› Set up an Ellf action using the Extract PDF layout recipe (pdf_layout_fetch) and help me choose the right settings for my data.- In the app, go to ActionsNew action.
- Select the Extract PDF layout recipe under PDF.
- Fill in the form – you'll need to provide Output asset, PDF document set and Model. Everything else has sensible defaults.
- Create the action. It starts on your cluster straight away.
Create the action with ellf actions create and the recipe name. All settings from the form are available as arguments. To view all recipe arguments, run ellf actions create pdf_layout_fetch --help.
| Argument | Type | Description | Default |
|---|---|---|---|
--name | str | Name of the action | None |
--output.name | str | Output asset name | |
--input | str | PDF document set: PDFs published to your cluster, with their pages rendered as images. | |
--model-blank | bool | Blank spaCy model: For tokenization only, no suggestions.One option for Model | None |
--model.lang | str | Language: Base language to use for tokenization.One option for ModelAvailable: af, am, ar, az, bg, bn, bo, ca, cs, da, de, dsb, el, en, es, et, eu, fa, fi, fo, fr, ga, gd, grc, gu, he, hi, hr, hsb, ht, hu, hy, id, is, it, ja, kmr, kn, ko, ky, la, lb, lg, lij, lt, lv, mk, ml, mr, ms, nb, ne, nl, nn, pl, pt, ro, ru, sa, si, sk, sl, sq, sr, sv, ta, te, th, ti, tl, tn, tr, tt, uk, ur, vi, xx, yo, zh | "en" |
--model.name | str | Model: If you have custom pipelines, you can add them to your cluster.One option for Model | None |
--focus | List[str] | Layout types to focus on: Prepare the asset in focus mode: comma-separated list of layout span labels to annotate section-by-section, e.g. text, list_item or section_header. Leave empty to keep full pages (grouped/split is then chosen at annotation time). | [] |
--project-id | str | Project ID to add action to. Defaults to your saved project. | None |
--worker-class | str | Worker class to launch the action on, as configured on your cluster | None |