Render Office Open XML files in native applications (word, pages, etc...)
Support for rendering
.docx— WordprocessingML.xlsx— SpreadsheetML.pptx— PresentationML
This tool can be used as a part of visual regression for various editors
.docxmsword— ✅ macos / 🔜 winpages— ✅ macoslibreoffice— ✅ macos / 🔜 linux / 🔜 wingoogledocs— 🔜onedrive— 🔜
.pptxpowerpoint— 🔜 macos / 🔜 winkeynote— ✅ macoslibreoffice— ✅ macos / 🔜 linux / 🔜 wingoogledocs— 🔜onedrive— 🔜
.xlsxexcel— 🔜 macos / 🔜 winnumbers— ✅ macoslibreoffice— ✅ macos / 🔜 linux / 🔜 wingoogledocs— 🔜onedrive— 🔜
You must have the apps you wish to use above installed on your machine.
We use imagemagick for converting PDFs created from the various editors. So you must either have the imagemagick CLI installed locally or docker/docker-compose installed on your machine.
import render from "@ooxml-tools/render";
const input = await readFile("./test.docx");
const outputDir = "./output/";
await render(input, ["msword"], { outputDir });npx @ooxml-tools/render --help
# ooxml-render <command> [args]
#
# Commands:
# render <filepath> render files
# support <filepath> list supported apps for <filepath>
#
# Options:
# --version Show version number [boolean]
# --help Show help [boolean]MIT