yumauri / gotenberg-js-client

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

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

Closed htt828 closed 2 years ago

htt828 commented 2 years 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 2 years ago

Did you solve your problem?