insertText("\n") makes new paragraphs. For a line break inside a paragraph, use insertBreak("Line").
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Reducto","colors":{"primary":"#5c0c5c","light":"#c77dba","dark":"#5c0c5c"},"logo":{"light":"https://cdn.reducto.ai/logo.svg","dark":"https://cdn.reducto.ai/logo-dark.svg"},"favicon":"https://mintcdn.com/reducto/7owl8-bq0hdh9XB8/favicon.ico?fit=max\u0026auto=format\u0026n=7owl8-bq0hdh9XB8\u0026q=85\u0026s=90372b27ca6d42c4f6192cbba673afb5","api":{"examples":{"languages":["python","javascript","go"]}},"appearance":{"default":"light"},"navbar":{"links":[{"href":"https://reducto.ai/?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_product_bridge\u0026utm_content=navbar_product","label":"Product"},{"href":"https://reducto.ai/blog","label":"Blog"}],"primary":{"type":"button","label":"Log In","href":"https://studio.reducto.ai/"}},"footer":{"socials":{"x":"https://x.com/reductoai","linkedin":"https://www.linkedin.com/company/reducto-ai"},"links":[{"header":"Product","items":[{"label":"Homepage","href":"https://reducto.ai/"},{"label":"Pricing","href":"https://reducto.ai/pricing"},{"label":"Playground","href":"https://studio.reducto.ai/"}]},{"header":"Company","items":[{"label":"Careers","href":"https://reducto.ai/careers"},{"label":"Blog","href":"https://reducto.ai/blog"},{"label":"Support","href":"mailto:support@Reducto.ai"}]},{"header":"Legal","items":[{"label":"Privacy Policy","href":"https://reducto.ai/privacy"},{"label":"Terms of Service","href":"https://reducto.ai/terms"}]}]},"fonts":{"heading":{"family":"Reducto Sans Bold","source":"https://cdn.reducto.ai/fonts/ReductoSansBold.woff2","format":"woff2"},"body":{"family":"Reducto Sans","source":"https://cdn.reducto.ai/fonts/ReductoSans.woff2","format":"woff2"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Status","icon":"signal","href":"https://status.reducto.ai"},{"anchor":"Studio","icon":"browser","href":"https://studio.reducto.ai"},{"anchor":"Support","icon":"envelope","href":"mailto:support@reducto.ai"},{"anchor":"Model Versions","icon":"bell","href":"/reference/model-versions"},{"anchor":"Changelog","icon":"clock-rotate-left","href":"/reference/changelog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"reducto","hasAudioNarration":false,"actualSubdomain":"reducto","customDomains":["docs.reducto.ai"],"gitSource":{"type":"github","owner":"reductoai","repo":"api","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"issues":false,"edits":false,"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aff308676e1397cafb0e688","clientVersion":"0.0.4205","searchFilterCounts":[{"language":"default","tag":"Office","count":222},{"language":"default","tag":"API reference","count":153},{"language":"default","tag":"Documentation","count":92},{"language":"default","tag":".xlsx","count":90},{"language":"default","tag":".docx","count":81},{"language":"default","tag":".pptx","count":42},{"language":"default","tag":"API Reference","count":36},{"language":"default","tag":"Other classes","count":30},{"language":"default","tag":"SDKs","count":30},{"language":"default","tag":"Types: editor","count":26}]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@reducto.ai","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"office/docx/js-api/node","slug":"/office/docx/js-api/node","pageMetadata":{"title":"Office.js in Node","description":null,"href":"/office/docx/js-api/node"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Import from `,_jsx(_components.code,{children:`@reductoai/docx/node`}),`. It gives a `,_jsx(_components.code,{children:`WordDocument`}),` that reads and writes files and renders with the fonts on the machine.`]}),`\n`,_jsx(Heading,{level:`2`,id:`open-edit-save`,children:`Open, edit, save`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`WordDocument`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@reductoai/docx/node\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` doc`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` WordDocument`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`open`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"contract.docx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` hit`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`search`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACME Corp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`matchCase:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }).`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`items`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` hit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`insertText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Globex Ltd\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Replace\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` heading`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`insertParagraph`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Schedule A\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"End\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`heading`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`styleBuiltIn`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Heading1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`insertParagraph`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The services are listed below.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"End\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`save`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"contract-edited.docx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`save`}),` always needs a path. OfficeJS never writes over the input file by itself.`]}),`\n`,_jsx(Heading,{level:`2`,id:`create-a-new-document`,children:`Create a new document`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` doc`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` WordDocument`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`setDefaultFont`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Arial\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// A new document has one empty paragraph. Use it first.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` title`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`paragraphs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`items`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`title`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`insertText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Quarterly report\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Replace\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`title`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`styleBuiltIn`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` table`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`insertTable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"End\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Region\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Revenue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EMEA\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"4.2M\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"APAC\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3.1M\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`table`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getBorder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"All\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Single\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`table`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getCell`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`paragraphs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`items`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`font`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bold`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`save`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"report.docx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`bytes-in-bytes-out`,children:`Bytes in, bytes out`}),`\n`,_jsx(_components.p,{children:`When the document comes from a request or a bucket, use bytes:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` doc`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` WordDocument`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fromBytes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Uint8Array`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` file`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`arrayBuffer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()));`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// ... edit ...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` bytes`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toBytes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`render`,children:`Render`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toPdf`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"contract.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// writes the file, also returns the bytes`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` pngs`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toPng`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`scale:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// [{ page, png, width, height }]`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Both render the `,_jsx(_components.strong,{children:`current`}),` edit state. You do not need to save first. See `,_jsx(_components.a,{href:`/office/docx/conversion/pdf`,children:`PDF`}),` and `,_jsx(_components.a,{href:`/office/docx/conversion/png`,children:`PNG`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`read-what-is-on-a-page`,children:`Read what is on a page`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`readPage`}),` gives a short text sketch of one laid-out page. It is useful for checks and for LLM agents.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`readPage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// page 1/1 sparse`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 11% p:0 Master Services Agreement`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 15% p:1 The Supplier shall deliver the Services within 30 days.`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`common-tasks`,children:`Common tasks`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`24`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`24`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` p`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`paragraphs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`items`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Formatting`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`font`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`set`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Arial\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`size:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 11`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bold:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`color:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"#000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`set`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`alignment:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Left\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`spaceBefore:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`spaceAfter:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 6`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`setLineSpacing`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`rule:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Exactly\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`points:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 13`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getRange`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Whole\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`font`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bold`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Page setup, headers and footers`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` section`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sections`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`items`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`section`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`pageSetup`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`set`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`pageWidth:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 612`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`pageHeight:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 792`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`topMargin:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 54`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bottomMargin:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 54`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`section`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getHeader`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Primary\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`insertParagraph`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Confidential\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Replace\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Lists`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` list`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`startNewList`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"decimal\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`list`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`insertParagraph`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Second item\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"End\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Links, footnotes, pictures`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`insertHyperlink`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Website\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getRange`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"End\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`insertFootnote`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Source note\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`insertInlinePictureFromBase64`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`base64Png`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"End\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`width:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 120`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Fields (TOC, page numbers) need layout`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` report`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`updateFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`insertText(\"\\\\n\")`}),` makes new paragraphs. For a line break inside a paragraph, use `,_jsx(_components.code,{children:`insertBreak(\"Line\")`}),`.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Office.js in Node","description":null,"href":"/office/docx/js-api/node"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Open, edit, save","slug":"open-edit-save","depth":2,"children":[]},{"title":"Create a new document","slug":"create-a-new-document","depth":2,"children":[]},{"title":"Bytes in, bytes out","slug":"bytes-in-bytes-out","depth":2,"children":[]},{"title":"Render","slug":"render","depth":2,"children":[]},{"title":"Read what is on a page","slug":"read-what-is-on-a-page","depth":2,"children":[]},{"title":"Common tasks","slug":"common-tasks","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"reducto","siteName":"Reducto","title":"Office.js in Node - Reducto","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-19T17:24:05.229Z","originalFileLocation":"office/docx/js-api/node.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Reducto\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/reducto/riSUMTseceMg4CLB/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/reducto/riSUMTseceMg4CLB/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/reducto/riSUMTseceMg4CLB/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/reducto/riSUMTseceMg4CLB/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/reducto/riSUMTseceMg4CLB/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/reducto/riSUMTseceMg4CLB/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/reducto/riSUMTseceMg4CLB/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/reducto/riSUMTseceMg4CLB/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/reducto/riSUMTseceMg4CLB/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Office.js in Node - Reducto\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Reducto\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.reducto.ai/office/docx/js-api/node\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://reducto.mintlify.site/_mintlify/api/og/v2?division=JS+API\u0026amp;title=Office.js+in+Node\u0026amp;theme=8265b8622ae183e65f8e9b16\u0026amp;signature=6fba1b086ecf1a80049fcc2c188c67cf7202a0f7c1d0e28bce6992f639b2670e\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Office.js in Node - Reducto\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://reducto.mintlify.site/_mintlify/api/og/v2?division=JS+API\u0026amp;title=Office.js+in+Node\u0026amp;theme=8265b8622ae183e65f8e9b16\u0026amp;signature=6fba1b086ecf1a80049fcc2c188c67cf7202a0f7c1d0e28bce6992f639b2670e\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/reducto/riSUMTseceMg4CLB/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Reducto\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5c0c5c\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.reducto.ai/office/docx/js-api/node\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/office/docx/js-api/node.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.reducto.ai/#organization\",\"name\":\"Reducto\",\"url\":\"https://docs.reducto.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://cdn.reducto.ai/logo.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.reducto.ai#website\",\"name\":\"Reducto\",\"url\":\"https://docs.reducto.ai\",\"publisher\":{\"@id\":\"https://docs.reducto.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.reducto.ai/office/docx/js-api/node#webpage\",\"url\":\"https://docs.reducto.ai/office/docx/js-api/node\",\"name\":\"Office.js in Node\",\"dateModified\":\"2026-11-19T17:24:05.229Z\",\"isPartOf\":{\"@id\":\"https://docs.reducto.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.reducto.ai/office/docx/js-api/node#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.reducto.ai/office/docx/js-api/node#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\".docx\",\"item\":\"https://docs.reducto.ai/office/docx/getting-started/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JS API\",\"item\":\"https://docs.reducto.ai/office/docx/js-api/concepts\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Office.js in Node\",\"item\":\"https://docs.reducto.ai/office/docx/js-api/node\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.reducto.ai/office/docx/js-api/node#article\",\"headline\":\"Office.js in Node\",\"name\":\"Office.js in Node\",\"url\":\"https://docs.reducto.ai/office/docx/js-api/node\",\"mainEntityOfPage\":{\"@id\":\"https://docs.reducto.ai/office/docx/js-api/node#webpage\"},\"dateModified\":\"2026-11-19T17:24:05.229Z\",\"publisher\":{\"@id\":\"https://docs.reducto.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.reducto.ai#website\"}}]}\u003c/script>","agentPointerHref":"/office/docx/js-api/node.md","siteName":"Reducto","nav":{"global":{"anchors":[{"anchor":"Status","icon":"signal","href":"https://status.reducto.ai"},{"anchor":"Studio","icon":"browser","href":"https://studio.reducto.ai"},{"anchor":"Support","icon":"envelope","href":"mailto:support@reducto.ai"},{"anchor":"Model Versions","icon":"bell","href":"/reference/model-versions"},{"anchor":"Changelog","icon":"clock-rotate-left","href":"/reference/changelog"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/overview"}]},{"tab":"Office","groups":[{"group":"Reducto Office","pages":[{"title":"Reducto Office","icon":"file-word","href":"/office"},{"title":"Document server","icon":"server","href":"/office/document-server"}]},{"group":"Licensing","pages":[{"title":"How licensing works","href":"/office/licensing/overview"},{"title":"Set up","href":"/office/licensing/setup"},{"title":"Sessions and billing","href":"/office/licensing/sessions"},{"title":"License checks","href":"/office/licensing/checks"},{"title":"Troubleshooting","href":"/office/licensing/troubleshooting"},{"title":"What the package sends","href":"/office/licensing/data"},{"title":"Check protocol","href":"/office/licensing/protocol"}]},{"group":".docx","pages":[{"group":"Getting started","pages":[{"title":"Overview","href":"/office/docx/getting-started/overview"},{"title":"Installation","href":"/office/docx/getting-started/installation"},{"title":"Fonts","href":"/office/docx/getting-started/fonts"},{"title":"Migrate to 0.1.0","href":"/office/docx/getting-started/upgrading"}]},{"group":"JS API","pages":[{"title":"Concepts","description":null,"href":"/office/docx/js-api/concepts"},{"title":"Office.js in Node","href":"/office/docx/js-api/node"},{"title":"Office.js in the browser","description":null,"href":"/office/docx/js-api/browser"}]},{"group":"Conversion","pages":[{"title":"DOCX to PDF","href":"/office/docx/conversion/pdf"},{"title":"DOCX to PNG","href":"/office/docx/conversion/png"},{"title":"Command line","href":"/office/docx/conversion/cli"},{"title":"Blocks and citations","href":"/office/docx/conversion/blocks"}]},{"group":"Recipes","pages":[{"title":"Redlining","href":"/office/docx/recipes/redlining"},{"title":"Comments","href":"/office/docx/recipes/comments"},{"title":"Compare documents","href":"/office/docx/recipes/compare"}]},{"group":"Display and editing UI","pages":[{"title":"Choose a layer","href":"/office/docx/ui/choose-a-layer"},{"title":"Editor","href":"/office/docx/ui/editor"},{"title":"Agent edits","href":"/office/docx/ui/agent-edits"},{"title":"Custom components","href":"/office/docx/ui/custom-components"},{"title":"Headless editor","href":"/office/docx/ui/headless-editor"},{"title":"Build your own skin","href":"/office/docx/ui/custom-skin"},{"title":"Canvas viewer","href":"/office/docx/ui/canvas-viewer"},{"title":"Keyboard shortcuts","href":"/office/docx/ui/keyboard-shortcuts"}]},{"group":"API reference","pages":[{"title":"WordDocument","href":"/office/docx/api/word-document"},{"title":"Body","href":"/office/docx/api/body"},{"title":"Paragraph","href":"/office/docx/api/paragraph"},{"title":"Range","href":"/office/docx/api/range"},{"title":"Font","href":"/office/docx/api/font"},{"title":"Tables","href":"/office/docx/api/tables"},{"title":"Lists","href":"/office/docx/api/lists"},{"title":"Sections","href":"/office/docx/api/sections"},{"title":"Content controls","href":"/office/docx/api/content-controls"},{"title":"Pictures","href":"/office/docx/api/pictures"},{"title":"Comments and revisions","href":"/office/docx/api/review"},{"title":"Styles","href":"/office/docx/api/styles"},{"title":"@reductoai/docx/node","href":"/office/docx/api/node"},{"title":"@reductoai/docx/browser","href":"/office/docx/api/browser"},{"title":"Parse, layout and render","href":"/office/docx/api/pipeline"},{"title":"@reductoai/docx-editor","href":"/office/docx/api/docx-editor"},{"title":"EditorModel","href":"/office/docx/api/editor-model"},{"title":"Review, find and navigation models","href":"/office/docx/api/editor-panels"},{"title":"Editor actions","href":"/office/docx/api/editor-actions"},{"title":"Fonts, colours and galleries","href":"/office/docx/api/editor-galleries"},{"title":"Keyboard shortcuts","href":"/office/docx/api/keyboard"},{"title":"@reductoai/docx-editor/react","href":"/office/docx/api/react"},{"group":"Other classes","pages":[{"title":"Other classes","href":"/office/docx/api/more-classes"},{"title":"Other classes: References and fields","href":"/office/docx/api/more-classes-references-and-fields"},{"title":"Other classes: Content controls","href":"/office/docx/api/more-classes-content-controls"},{"title":"Other classes: Review and comments","href":"/office/docx/api/more-classes-review-and-comments"},{"title":"Other classes: Tables","href":"/office/docx/api/more-classes-tables"},{"title":"Other classes: Sections and pages","href":"/office/docx/api/more-classes-sections-and-pages"},{"title":"Other classes: Shapes, pictures and charts","href":"/office/docx/api/more-classes-shapes-pictures-and-charts"},{"title":"Other classes: Lists","href":"/office/docx/api/more-classes-lists"},{"title":"Other classes: Text and formatting","href":"/office/docx/api/more-classes-text-and-formatting"},{"title":"Other classes: Editor","href":"/office/docx/api/more-classes-editor"},{"title":"Other classes: Other","href":"/office/docx/api/more-classes-other"}]},{"group":"Types: OfficeJS","pages":[{"title":"Types: OfficeJS","href":"/office/docx/api/types-facade"},{"title":"Types: OfficeJS: References and fields","href":"/office/docx/api/types-facade-references-and-fields"},{"title":"Types: OfficeJS: Content controls","href":"/office/docx/api/types-facade-content-controls"},{"title":"Types: OfficeJS: Review and comments","href":"/office/docx/api/types-facade-review-and-comments"},{"title":"Types: OfficeJS: Tables","href":"/office/docx/api/types-facade-tables"},{"title":"Types: OfficeJS: Sections and pages","href":"/office/docx/api/types-facade-sections-and-pages"},{"title":"Types: OfficeJS: Shapes, pictures and charts","href":"/office/docx/api/types-facade-shapes-pictures-and-charts"},{"title":"Types: OfficeJS: Lists","href":"/office/docx/api/types-facade-lists"},{"title":"Types: OfficeJS: Text and formatting","href":"/office/docx/api/types-facade-text-and-formatting"},{"title":"Types: OfficeJS: Editor","href":"/office/docx/api/types-facade-editor"},{"title":"Types: OfficeJS: Other","href":"/office/docx/api/types-facade-other"}]},{"group":"Types: editor","pages":[{"title":"Types: editor","href":"/office/docx/api/types-editor"},{"title":"Types: editor: References and fields","href":"/office/docx/api/types-editor-references-and-fields"},{"title":"Types: editor: Content controls","href":"/office/docx/api/types-editor-content-controls"},{"title":"Types: editor: Review and comments","href":"/office/docx/api/types-editor-review-and-comments"},{"title":"Types: editor: Tables","href":"/office/docx/api/types-editor-tables"},{"title":"Types: editor: Sections and pages","href":"/office/docx/api/types-editor-sections-and-pages"},{"title":"Types: editor: Shapes, pictures and charts","href":"/office/docx/api/types-editor-shapes-pictures-and-charts"},{"title":"Types: editor: Lists","href":"/office/docx/api/types-editor-lists"},{"title":"Types: editor: Text and formatting","href":"/office/docx/api/types-editor-text-and-formatting"},{"title":"Types: editor: Collaboration","href":"/office/docx/api/types-editor-collaboration"},{"title":"Types: editor: Editor","href":"/office/docx/api/types-editor-editor"},{"title":"Types: editor: Other","href":"/office/docx/api/types-editor-other"}]},{"title":"Types: layout and fonts","href":"/office/docx/api/types-layout"}]},{"group":"Changelog","pages":[{"title":"@reductoai/docx","href":"/office/docx/changelog/docx"},{"title":"@reductoai/docx-editor","href":"/office/docx/changelog/docx-editor"}]}]},{"group":".pptx","pages":[{"group":"Getting started","pages":[{"title":"Overview","href":"/office/pptx/getting-started/overview"},{"title":"Installation","href":"/office/pptx/getting-started/installation"},{"title":"Fonts","href":"/office/pptx/getting-started/fonts"}]},{"group":"JS API","pages":[{"title":"Concepts","href":"/office/pptx/js-api/concepts"},{"title":"JS API in Node","href":"/office/pptx/js-api/node"},{"title":"JS API in the browser","href":"/office/pptx/js-api/browser"}]},{"group":"Conversion","pages":[{"title":".pptx to PDF","href":"/office/pptx/conversion/pdf"},{"title":".pptx to PNG","href":"/office/pptx/conversion/png"},{"title":"Command line","href":"/office/pptx/conversion/cli"}]},{"group":"Recipes","pages":[{"title":"Blank decks","href":"/office/pptx/recipes/blank-decks"},{"title":"Collaboration","href":"/office/pptx/recipes/collab"}]},{"group":"Display and editing UI","pages":[{"title":"Editor","href":"/office/pptx/ui/editor"},{"title":"Headless editor","href":"/office/pptx/ui/headless-editor"}]},{"group":"API reference","pages":[{"title":"PowerPointPresentation","href":"/office/pptx/api/presentation"},{"title":"Slides","href":"/office/pptx/api/slides"},{"title":"Shapes","href":"/office/pptx/api/shapes"},{"title":"Fill, line and effects","href":"/office/pptx/api/shape-format"},{"title":"Text","href":"/office/pptx/api/text"},{"title":"Tables","href":"/office/pptx/api/tables"},{"title":"Charts","href":"/office/pptx/api/charts"},{"title":"Notes, comments and links","href":"/office/pptx/api/notes-comments"},{"title":"Themes and backgrounds","href":"/office/pptx/api/themes"},{"title":"@reductoai/pptx/node","href":"/office/pptx/api/node"},{"title":"@reductoai/pptx/browser","href":"/office/pptx/api/browser"},{"title":"Parse, layout and render","href":"/office/pptx/api/pipeline"},{"title":"@reductoai/pptx/editor","href":"/office/pptx/api/editor"},{"title":"@reductoai/pptx/collab","href":"/office/pptx/api/collab"},{"title":"@reductoai/pptx-editor","href":"/office/pptx/api/pptx-editor"},{"title":"Keyboard shortcuts","href":"/office/pptx/api/keyboard"},{"title":"@reductoai/pptx-editor/react","href":"/office/pptx/api/react"},{"group":"Other classes","pages":[{"title":"Other classes","href":"/office/pptx/api/more-classes"},{"title":"Other classes: Slides and shows","href":"/office/pptx/api/more-classes-slides-and-shows"},{"title":"Other classes: Tables","href":"/office/pptx/api/more-classes-tables"},{"title":"Other classes: Text and fonts","href":"/office/pptx/api/more-classes-text-and-fonts"},{"title":"Other classes: Shapes and charts","href":"/office/pptx/api/more-classes-shapes-and-charts"},{"title":"Other classes: Editor","href":"/office/pptx/api/more-classes-editor"},{"title":"Other classes: Other","href":"/office/pptx/api/more-classes-other"}]},{"title":"Types: OfficeJS","href":"/office/pptx/api/types-facade"},{"title":"Types: editor","href":"/office/pptx/api/types-editor"},{"title":"Types: layout and fonts","href":"/office/pptx/api/types-layout"}]},{"group":"Changelog","pages":[{"title":"@reductoai/pptx","href":"/office/pptx/changelog/pptx"},{"title":"@reductoai/pptx-editor","href":"/office/pptx/changelog/pptx-editor"}]}]},{"group":".xlsx","pages":[{"group":"Getting started","pages":[{"title":"Overview","href":"/office/xlsx/getting-started/overview"},{"title":"Installation","href":"/office/xlsx/getting-started/installation"},{"title":"Fonts","href":"/office/xlsx/getting-started/fonts"}]},{"group":"JS API","pages":[{"title":"Concepts","href":"/office/xlsx/js-api/concepts"},{"title":"JS API in Node","href":"/office/xlsx/js-api/node"},{"title":"JS API in the browser","href":"/office/xlsx/js-api/browser"}]},{"group":"Rendering and calculation","pages":[{"title":".xlsx to PDF","href":"/office/xlsx/rendering/pdf"},{"title":".xlsx to PNG","href":"/office/xlsx/rendering/png"},{"title":"Recalculation","href":"/office/xlsx/rendering/recalculation"},{"title":"View","href":"/office/xlsx/rendering/view"}]},{"group":"Recipes","pages":[{"title":"Blank workbook","href":"/office/xlsx/recipes/blank-workbook"},{"title":"Formulas","href":"/office/xlsx/recipes/formulas"},{"title":"Tables","href":"/office/xlsx/recipes/tables"},{"title":"Charts","href":"/office/xlsx/recipes/charts"},{"title":"Conditional formats and validation","href":"/office/xlsx/recipes/conditional-formats"},{"title":"Pictures in cells","href":"/office/xlsx/recipes/pictures-in-cells"},{"title":"Custom functions","href":"/office/xlsx/recipes/custom-functions"}]},{"group":"Display and editing UI","pages":[{"title":"Editor","href":"/office/xlsx/ui/editor"},{"title":"Headless editor","href":"/office/xlsx/ui/headless-editor"}]},{"group":"API reference","pages":[{"title":"ExcelWorkbook","href":"/office/xlsx/api/excel-workbook"},{"title":"ExcelWorksheet","href":"/office/xlsx/api/worksheet"},{"title":"ExcelRange","href":"/office/xlsx/api/range"},{"title":"Formats and styles","href":"/office/xlsx/api/format"},{"title":"Names and functions","href":"/office/xlsx/api/names-functions"},{"title":"Tables and filters","href":"/office/xlsx/api/tables"},{"title":"Charts","href":"/office/xlsx/api/charts"},{"title":"Pivot tables","href":"/office/xlsx/api/pivots"},{"title":"Conditional formats and validation","href":"/office/xlsx/api/conditional-formats"},{"title":"Comments and notes","href":"/office/xlsx/api/comments"},{"title":"Shapes and pictures","href":"/office/xlsx/api/shapes"},{"title":"@reductoai/xlsx","href":"/office/xlsx/api/workbook"},{"title":"@reductoai/xlsx/view","href":"/office/xlsx/api/view"},{"title":"@reductoai/xlsx/editor","href":"/office/xlsx/api/editor"},{"title":"@reductoai/xlsx/collab","href":"/office/xlsx/api/collab"},{"title":"@reductoai/xlsx-editor","href":"/office/xlsx/api/xlsx-editor"},{"title":"Keyboard shortcuts","href":"/office/xlsx/api/keyboard"},{"title":"@reductoai/xlsx-editor/react","href":"/office/xlsx/api/react"},{"group":"Other classes","pages":[{"title":"Other classes","href":"/office/xlsx/api/more-classes"},{"title":"Other classes: Conditional formats","href":"/office/xlsx/api/more-classes-conditional-formats"},{"title":"Other classes: PivotTables and slicers","href":"/office/xlsx/api/more-classes-pivottables-and-slicers"},{"title":"Other classes: Charts and sparklines","href":"/office/xlsx/api/more-classes-charts-and-sparklines"},{"title":"Other classes: Tables","href":"/office/xlsx/api/more-classes-tables"},{"title":"Other classes: Shapes and pictures","href":"/office/xlsx/api/more-classes-shapes-and-pictures"},{"title":"Other classes: Formulas and names","href":"/office/xlsx/api/more-classes-formulas-and-names"},{"title":"Other classes: Page layout and printing","href":"/office/xlsx/api/more-classes-page-layout-and-printing"},{"title":"Other classes: Formatting and styles","href":"/office/xlsx/api/more-classes-formatting-and-styles"},{"title":"Other classes: Comments and protection","href":"/office/xlsx/api/more-classes-comments-and-protection"},{"title":"Other classes: Editor","href":"/office/xlsx/api/more-classes-editor"},{"title":"Other classes: Other","href":"/office/xlsx/api/more-classes-other"}]},{"group":"Types: OfficeJS","pages":[{"title":"Types: OfficeJS","href":"/office/xlsx/api/types-facade"},{"title":"Types: OfficeJS: Conditional formats","href":"/office/xlsx/api/types-facade-conditional-formats"},{"title":"Types: OfficeJS: PivotTables and slicers","href":"/office/xlsx/api/types-facade-pivottables-and-slicers"},{"title":"Types: OfficeJS: Charts and sparklines","href":"/office/xlsx/api/types-facade-charts-and-sparklines"},{"title":"Types: OfficeJS: Shapes and pictures","href":"/office/xlsx/api/types-facade-shapes-and-pictures"},{"title":"Types: OfficeJS: Formulas and names","href":"/office/xlsx/api/types-facade-formulas-and-names"},{"title":"Types: OfficeJS: Data, sorting and validation","href":"/office/xlsx/api/types-facade-data-sorting-and-validation"},{"title":"Types: OfficeJS: Page layout and printing","href":"/office/xlsx/api/types-facade-page-layout-and-printing"},{"title":"Types: OfficeJS: Formatting and styles","href":"/office/xlsx/api/types-facade-formatting-and-styles"},{"title":"Types: OfficeJS: Comments and protection","href":"/office/xlsx/api/types-facade-comments-and-protection"},{"title":"Types: OfficeJS: Editor","href":"/office/xlsx/api/types-facade-editor"},{"title":"Types: OfficeJS: Other","href":"/office/xlsx/api/types-facade-other"}]},{"group":"Types: editor","pages":[{"title":"Types: editor","href":"/office/xlsx/api/types-editor"},{"title":"Types: editor: Conditional formats","href":"/office/xlsx/api/types-editor-conditional-formats"},{"title":"Types: editor: PivotTables and slicers","href":"/office/xlsx/api/types-editor-pivottables-and-slicers"},{"title":"Types: editor: Charts and sparklines","href":"/office/xlsx/api/types-editor-charts-and-sparklines"},{"title":"Types: editor: Tables","href":"/office/xlsx/api/types-editor-tables"},{"title":"Types: editor: Shapes and pictures","href":"/office/xlsx/api/types-editor-shapes-and-pictures"},{"title":"Types: editor: Formulas and names","href":"/office/xlsx/api/types-editor-formulas-and-names"},{"title":"Types: editor: Data, sorting and validation","href":"/office/xlsx/api/types-editor-data-sorting-and-validation"},{"title":"Types: editor: Page layout and printing","href":"/office/xlsx/api/types-editor-page-layout-and-printing"},{"title":"Types: editor: Formatting and styles","href":"/office/xlsx/api/types-editor-formatting-and-styles"},{"title":"Types: editor: Comments and protection","href":"/office/xlsx/api/types-editor-comments-and-protection"},{"title":"Types: editor: Collaboration","href":"/office/xlsx/api/types-editor-collaboration"},{"title":"Types: editor: Editor","href":"/office/xlsx/api/types-editor-editor"},{"title":"Types: editor: Other","href":"/office/xlsx/api/types-editor-other"}]},{"group":"Types: layout and fonts","pages":[{"title":"Types: layout and fonts","href":"/office/xlsx/api/types-layout"},{"title":"Types: layout and fonts: Conditional formats","href":"/office/xlsx/api/types-layout-conditional-formats"},{"title":"Types: layout and fonts: PivotTables and slicers","href":"/office/xlsx/api/types-layout-pivottables-and-slicers"},{"title":"Types: layout and fonts: Charts and sparklines","href":"/office/xlsx/api/types-layout-charts-and-sparklines"},{"title":"Types: layout and fonts: Tables","href":"/office/xlsx/api/types-layout-tables"},{"title":"Types: layout and fonts: Shapes and pictures","href":"/office/xlsx/api/types-layout-shapes-and-pictures"},{"title":"Types: layout and fonts: Formulas and names","href":"/office/xlsx/api/types-layout-formulas-and-names"},{"title":"Types: layout and fonts: Data, sorting and validation","href":"/office/xlsx/api/types-layout-data-sorting-and-validation"},{"title":"Types: layout and fonts: Page layout and printing","href":"/office/xlsx/api/types-layout-page-layout-and-printing"},{"title":"Types: layout and fonts: Formatting and styles","href":"/office/xlsx/api/types-layout-formatting-and-styles"},{"title":"Types: layout and fonts: Comments and protection","href":"/office/xlsx/api/types-layout-comments-and-protection"},{"title":"Types: layout and fonts: Collaboration","href":"/office/xlsx/api/types-layout-collaboration"},{"title":"Types: layout and fonts: Other","href":"/office/xlsx/api/types-layout-other"}]}]},{"group":"Changelog","pages":[{"title":"@reductoai/xlsx","href":"/office/xlsx/changelog/xlsx"},{"title":"@reductoai/xlsx-editor","href":"/office/xlsx/changelog/xlsx-editor"}]}]}]},{"tab":"API Reference","versions":[{"version":"Current","groups":[{"group":"Document Processing","pages":[{"openapi":"openapi.json post /parse","title":"Parse","href":"/api-reference/parse"},{"title":"Parse Async","openapi":"openapi.json post /parse_async","href":"/api-reference/async-parse"},{"openapi":"openapi.json post /upload","title":"Upload","href":"/api-reference/upload"},{"openapi":"openapi.json post /extract","title":"Extract","href":"/api-reference/extract"},{"openapi":"openapi.json post /extract_async","title":"Extract Async","href":"/api-reference/extract-async"},{"openapi":"openapi.json post /split","title":"Split","href":"/api-reference/split"},{"openapi":"openapi.json post /split_async","title":"Split Async","href":"/api-reference/split-async"},{"openapi":"openapi.json post /classify","title":"Classify","href":"/api-reference/classify"},{"openapi":"openapi.json post /classify_async","title":"Classify Async","href":"/api-reference/classify-async"},{"openapi":"openapi.json post /edit","title":"Edit","href":"/api-reference/edit"},{"openapi":"openapi.json post /edit_async","title":"Edit Async","href":"/api-reference/edit-async"},{"openapi":"openapi.json post /pipeline","title":"Pipeline","href":"/api-reference/pipeline"},{"openapi":"openapi.json post /pipeline_async","title":"Pipeline Async","href":"/api-reference/pipeline-async"}]},{"group":"Job Management","pages":[{"title":"Retrieve Job","openapi":"openapi.json get /job/{job_id}","href":"/api-reference/retrieve-parse"},{"openapi":"openapi.json post /cancel/{job_id}","title":"Cancel Job","href":"/api-reference/cancel-job"},{"title":"Delete Job","openapi":"openapi.json delete /job/{job_id}","href":"/api-reference/delete-job"},{"openapi":"openapi.json get /jobs","title":"Get Jobs","href":"/api-reference/get-jobs"}]},{"group":"File Management","pages":[{"title":"Delete Upload","openapi":"openapi.json delete /upload/{file_id}","href":"/api-reference/delete-upload"}]},{"group":"Utilities","pages":[{"openapi":"openapi.json post /configure_webhook","title":"Webhook Portal","href":"/api-reference/webhook-portal"},{"openapi":"openapi.json get /version","title":"Get Version","href":"/api-reference/get-version"}]}]},{"version":"Legacy API","pages":[{"title":"Legacy API","href":"/api-reference/legacy/parse"}]}]},{"tab":"Cookbooks","pages":[{"title":"Cookbooks","href":"/cookbooks/overview"}]},{"tab":"SDKs","versions":[{"version":"Python","groups":[{"group":"Get Started","pages":[{"title":"Python SDK Overview","sidebarTitle":"Overview","href":"/sdk/python/overview"}]},{"group":"Core Methods","pages":[{"title":"Upload","sidebarTitle":"Upload","href":"/sdk/python/upload"},{"title":"Parse","sidebarTitle":"Parse","href":"/sdk/python/parse"},{"title":"Extract","sidebarTitle":"Extract","href":"/sdk/python/extract"},{"title":"Split","sidebarTitle":"Split","href":"/sdk/python/split"},{"title":"Edit","sidebarTitle":"Edit","href":"/sdk/python/edit"},{"title":"Pipeline","sidebarTitle":"Pipeline","href":"/sdk/python/pipeline"}]},{"group":"Async \u0026 Utilities","pages":[{"title":"Async Client","sidebarTitle":"Async Client","href":"/sdk/python/async"},{"title":"Job Management","sidebarTitle":"Job Management","href":"/sdk/python/job-management"},{"title":"Error Handling","sidebarTitle":"Error Handling","href":"/sdk/python/error-handling"}]}]},{"version":"JavaScript","pages":[{"title":"JavaScript","href":"/sdk/javascript/overview"}]},{"version":"Go","pages":[{"title":"Go","href":"/sdk/go/overview"}]}]},{"tab":"Studio","pages":[{"title":"Studio","href":"/studio-parse"}]}]},"basePath":"","title":"Office.js in Node - Reducto","deploymentId":"dpl_FZMKUpaaKiVETbfqhoUe4sPFDTmY","buildId":"dpl_FZMKUpaaKiVETbfqhoUe4sPFDTmY","dynamics":[],"chunks":[]}