yumauri / gotenberg-js-client

A simple JS/TS client for interacting with a Gotenberg API
MIT License
110 stars 9 forks source link

word转pdf, typeError [ERR_INVALID_PROTOCOL]: Protocol "d:" not supported. Expected "https:" #52

Closed htt828 closed 1 year ago

htt828 commented 1 year ago

async docx2pdf(wordConfigFilePath, pdfConfigFilePath, fileName) { const toPDF = pipe( gotenberg(path.resolve(pdfConfigFilePath)), convert, office, to(landscape), set(filename(fileName + '.pdf')), please ); const pdf = await toPDF({ 'fileName.docx': fs.readFileSync(path.resolve(wordConfigFilePath, fileName + '.docx')) }); }, 我想通过docx转pdf 但是出现了这个报错 typeError [ERR_INVALID_PROTOCOL]: Protocol "d:" not supported. Expected "https:"

yumauri commented 1 year ago

Did you solve your problem?