add_document
Add a PDF datasheet to the store by copying or downloading it, building its index and element map, and linking it to a part when list_documents misses it.
Instructions
Add a PDF document to the store: copy or download it, build its index and its element map, and link it to its part. Use it when list_documents does not find the datasheet; the URL can come from a distributor tool or from the Datasheet field of a CAD symbol. The element map of a large document can take minutes: a background thread builds it, and the index and the page images are available at once. Gives the document reference, the pages, the size of the index and the state of the element map. Without part, it also gives a rough proposal of the MPN from the text of the PDF; it can be wrong. Read the MPN on page 1 of the original, then call add_document again with part. To put the part into the user project: project_add_part.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| part | No | The MPN that the datasheet describes: the base part, for example TLV755P (or one variant of a family). Empty: the result proposes an MPN from the PDF. | |
| path | Yes | A local PDF file, or an http or https URL of a PDF. | |
| role | No | The role of the document: datasheet, manual, errata, appnote or other. | datasheet |
| variants | No | The other parts that the same datasheet covers, for example ["ADC34J22", "ADC34J23"] for ADC34J24. Only with part. | |
| manufacturer | No | The manufacturer, for example TI. Necessary only when two parts have the same MPN. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |