Skip to content

Repository files navigation

Nutrient PDF Tools - Microsoft Word Add-in

A powerful Microsoft Word add-in that provides advanced PDF processing capabilities using the Nutrient DWS API. Convert PDFs to DOCX, create accessible PDFs, and more with enterprise-grade processing.

πŸš€ Features

Core Functionality

  • PDF to DOCX Conversion - Convert PDF files to editable Word documents with OCR support
  • Word to PDF Conversion - Convert Word documents to high-quality PDFs
  • PDF/A & PDF/UA Export - Create accessible and compliant PDFs
  • Document Redaction - Remove sensitive information and metadata (Coming Soon)
  • SharePoint/Teams Integration - Share documents to Microsoft 365 (Coming Soon)

Advanced Features

  • OCR Processing - Extract text from scanned documents with multiple language support
  • Accessibility Compliance - Generate PDF/UA compliant documents
  • High-Quality Output - Multiple quality settings for different use cases
  • Secure Processing - Enterprise-grade security with API key authentication

πŸ“‹ Prerequisites

  • Microsoft Word (Desktop or Online)
  • Node.js 16+ and npm
  • Nutrient DWS API credentials

πŸ› οΈ Installation

Development Setup

  1. Clone the repository

    git clone https://github.com/nutrient-io/word-nutrient-dwsapi.git
    cd word-nutrient-dwsapi
  2. Install dependencies

    npm install
  3. Configure API credentials

    • Open the add-in in Word
    • Go to Settings β†’ API Settings
    • Enter your Nutrient DWS API credentials:
      • Processor API Key (for PDF processing)
      • Viewer API Key (for PDF preview)
  4. Start development server

    npm run dev-server
  5. Load the add-in in Word

    npm start

Production Build

  1. Build the add-in

    npm run build
  2. Validate the manifest

    npm run validate

πŸ”§ Configuration

API Credentials

The add-in requires two API keys from Nutrient.io:

  1. Processor API Key - Used for PDF processing, conversion, and OCR
  2. Viewer API Key - Used for PDF preview and viewing

Environment Variables

  • NUTRIENT_API_BASE - API base URL (default: https://api.nutrient.io)
  • DEV_SERVER_PORT - Development server port (default: 3000)

πŸ“– Usage

Converting PDF to DOCX

  1. Open the Nutrient PDF Tools add-in in Word
  2. Click on "Import from PDF to DOCX"
  3. Drag and drop a PDF file or click to browse
  4. Configure OCR options (if needed)
  5. Click "Convert & Insert"
  6. The converted document will be inserted into your Word document

Converting Word to PDF

  1. Open the Nutrient PDF Tools add-in in Word
  2. Click on "Convert to PDF"
  3. Configure quality settings
  4. Click "Convert to PDF"
  5. Download the generated PDF

Creating Accessible PDFs

  1. Open the Nutrient PDF Tools add-in in Word
  2. Click on "Export to PDF/A or PDF/UA"
  3. Choose your preferred format (PDF/A or PDF/UA)
  4. Configure accessibility options
  5. Click "Export"
  6. Preview and download the accessible PDF

πŸ—οΈ Project Structure

word-nutrient-dwsapi/
β”œβ”€β”€ assets/                 # Static assets (icons, images)
β”œβ”€β”€ dist/                   # Built files (generated)
β”œβ”€β”€ docs/                   # Documentation
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ commands/          # Office commands
β”‚   └── taskpane/          # Main add-in interface
β”œβ”€β”€ manifest.xml           # Office add-in manifest
β”œβ”€β”€ package.json           # Dependencies and scripts
β”œβ”€β”€ webpack.config.js      # Build configuration
└── server.js              # Development server

πŸ”Œ API Integration

The add-in integrates with the Nutrient DWS API for:

  • Document Processing - Convert between PDF and DOCX formats
  • OCR Processing - Extract text from scanned documents
  • Accessibility - Generate compliant PDFs
  • Document Viewing - Preview PDFs in the browser

API Endpoints Used

  • POST /build - Document processing and conversion
  • POST /viewer/documents - Document upload for viewing
  • GET /viewer/embed - Document preview

πŸš€ Development

Available Scripts

  • npm run dev-server - Start development server
  • npm run build - Build for production
  • npm run build:dev - Build for development
  • npm start - Start Office add-in debugging
  • npm run validate - Validate manifest
  • npm run lint - Run linting
  • npm run serve - Start custom development server

Development Workflow

  1. Start the development server: npm run dev-server
  2. Start Office debugging: npm start
  3. Make changes to the code
  4. The add-in will automatically reload in Word

Debugging

  • Use browser developer tools for debugging
  • Check the browser console for detailed logs
  • Use the debug section in the add-in for API request/response details

πŸ”’ Security

  • API keys are stored locally in browser storage
  • All API requests use HTTPS
  • No sensitive data is logged or transmitted unnecessarily
  • CORS is properly configured for secure cross-origin requests

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

πŸ—ΊοΈ Roadmap

  • Document redaction features
  • SharePoint/Teams integration
  • Batch processing
  • Advanced OCR options
  • Custom templates
  • Multi-language support

πŸ“Š Version History

v1.0.0 (Current)

  • Initial release with core PDF processing features
  • PDF to DOCX conversion with OCR
  • Word to PDF conversion
  • PDF/A and PDF/UA export
  • Authentication system
  • Modern UI/UX

Built with ❀️ by Nutrient.io

About

A developer-ready Microsoft Word Add-in that integrates with Nutrient.io's DWS Processor API and DWS Viewer API, delivering PDF conversion, redaction, accessibility compliance, OCR processing, and collaboration features directly inside the Word UI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages