Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

mso-pdf

sancarn188MIT1.0.2

Uses interop to convert Word, PowerPoint and Excel documents to a PDF for previewing using PDF.js

mso, microsoft, m$, to, pdf, excel, word, powerpoint, preview, interop, ole, com

readme

ToPDF

This is likely extremely poorly written, but as is life

This utility converts word, excel and powerpoint documents to pdf using the Excel/Word/PowerPoint interop libraries.

Usage

    const toPdf = require('mso-pdf')
    var source         = "C:\\Users\\sancarn\\Documents\\TestToPDF.xlsx"
    var destination    = "C:\\Users\\sancarn\\Documents\\TestToPDF.pdf"
    toPdf.convert(source,destination,function(errors){
        if(errors) console.log(errors)
        console.log(destination + " converted")
    })