You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/components.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -748,6 +748,7 @@ To display a Word document without including the real multimedia:
748
748
749
749
-**src**: The source file to read the data from. This must be provided if records is not provided.
750
750
-**buffer**: Buffer. Document data buffer. Recommended to use `src` instead unless you want to use a string.
751
+
-**base64**: Base64 encoded string of the document data. Mutually exclusive with `src` and `buffer`.
751
752
-**parser**: Can be one of: auto, pdf, docx, txt. The parser to use for reading the data. If not provided, it will be inferred from the file extension.
752
753
-**multimedia**: Boolean. If true, the multimedias will be displayed. If false, the alt strings will be displayed at best effort. Default is `true`.
753
754
-**selectedPages**: The pages to be selected. This is only available **for PDF documents**. If not provided, all pages will be selected.
@@ -998,6 +999,7 @@ Convert HTML to structured POML components:
998
999
-**url**: The URL of the webpage to fetch and display.
999
1000
-**src**: Local file path to an HTML file to display.
1000
1001
-**buffer**: Buffer. HTML content as string or buffer.
1002
+
-**base64**: Base64 encoded HTML content.
1001
1003
-**extractText**: Boolean. Whether to extract plain text content (true) or convert HTML to structured POML (false). Default is false.
1002
1004
-**selector**: CSS selector to extract specific content from the page (e.g., "article", ".content", "#main"). Default is "body".
1003
1005
-**syntax**: Can be one of: markdown, html, json, yaml, xml, text. The syntax of the content.
@@ -238,6 +239,7 @@ async function autoParseDocument(
238
239
*
239
240
* @param {string} src - The source file to read the data from. This must be provided if records is not provided.
240
241
* @param {Buffer|string} buffer - Document data buffer. Recommended to use `src` instead unless you want to use a string.
242
+
* @param {string} base64 - Base64 encoded string of the document data. Mutually exclusive with `src` and `buffer`.
241
243
* @param {'auto'|'pdf'|'docx'|'txt'} parser - The parser to use for reading the data. If not provided, it will be inferred from the file extension.
242
244
* @param {boolean} multimedia - If true, the multimedias will be displayed. If false, the alt strings will be displayed at best effort. Default is `true`.
243
245
* @param {string} selectedPages - The pages to be selected. This is only available **for PDF documents**. If not provided, all pages will be selected.
@@ -255,15 +257,22 @@ async function autoParseDocument(
0 commit comments