Skip to main content

Openai Document

@dougschaefer/openai-documentv2026.04.27.2· 3d agoMODELS
01README

OpenAI-powered document processing for .pptx and .docx — analyze structure, enhance text while preserving formatting, generate from templates, and design pixel-perfect PDFs from natural-language instructions via headless Chromium. Vault-based API key.

02Release Notes

Add curated README and LICENSE to tarball (additionalFiles), bringing extension's Swamp Club quality grade from F/B to A-/B.

03Models1
@dougschaefer/openai-documentv2026.04.17.2openai-document/document.ts
fn analyze(filePath: string, outputName: string)
Parse a .pptx or .docx file and return its structure, sections, and text content.
ArgumentTypeDescription
filePathstringAbsolute path to the .pptx or .docx file
outputNamestring
fn design(instructions: string, contentSource?: string, context?: string, outputName: string)
Design a professional document as PDF. GPT generates complete HTML with inline CSS based on your design instructions and content, then headless Chromium renders it to a pixel-perfect PDF. Supports designing from scratch, from a content description, or from an existing .docx file's extracted content.
ArgumentTypeDescription
instructionsstringDesign and content direction — describe the visual style, layout, colors, and what content to include. E.g., 'Modern proposal for Snap Inc, Kentucky blue and white color scheme, clean layout with geometric accents, two-column sections where appropriate. Cover page with large color block and company name.'
contentSource?stringOptional: absolute path to a .docx file to extract content from. The design method will pull the text and restructure it into the new design. If omitted, GPT generates content based on instructions alone.
context?stringAdditional context — company info, client details, scope data, brand guidelines, etc.
outputNamestring
fn enhance(filePath: string, instructions: string, model: enum, outputName: string)
Enhance or modify text content of a .pptx or .docx using GPT, preserving formatting and design.
ArgumentTypeDescription
filePathstringAbsolute path to the .pptx or .docx file
instructionsstringWhat to change in the text content
modelenum
outputNamestring
fn generate(templatePath: string, instructions: string, context?: string, model: enum, outputName: string)
Generate a new document from a .docx/.pptx template by populating placeholders with GPT-generated content.
ArgumentTypeDescription
templatePathstringAbsolute path to the template .pptx or .docx file
instructionsstringWhat content to generate
context?stringAdditional context
modelenum
outputNamestring

Resources

analysis(infinite)— Parsed document structure and content
document(infinite)— Designed, generated, or enhanced document file
04Previous Versions1
2026.04.27.1Apr 27, 2026

Initial release. Four methods: analyze (parse .pptx/.docx structure), enhance (rewrite text preserving formatting), generate (populate templates with GPT content), design (generate pixel-perfect PDFs from natural-language instructions via headless Chromium).

05Stats
A
100 / 100
Downloads
0
Archive size
73.2 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • At least one platform tag (or universal)1/1earned
  • Two or more platform tags (or universal)1/1earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels