yumauri / gotenberg-js-client

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

What should I fill in the gotenberg parameter in the pipe method #53

Closed htt828 closed 1 year ago

yumauri commented 2 years ago

gotenberg function accept address of your Gotenberg instance, for example:

gotenberg('http://localhost:3000')

if you have Gotenberg running on localhost port 3000

htt828 commented 2 years ago

my code const toPDF = pipe( gotenberg(''), convert, office, to(landscape), adjust({ url: 'http://192.168.1.40:3000/forms/libreoffice/convert', }), set(filename(fileName + '.pdf')), please ); const pdf = await toPDF({ [fileName + '.docx']: fs.createReadStream(path.resolve(wordConfigFilePath, fileName + '.docx')) });

but Error: 500 Internal Server Error at IncomingMessage. (D:\workspace\jcqlc\node_modules\gotenberg-js-client\dist-node\index.js:46:18)

yumauri commented 2 years ago

Does Gotenberg logs some errors to stdout? Also, does it work fine if you use curl (or any other HTTP client) to send file directly to Gotenberg?

yumauri commented 1 year ago

I'll close this issue, feel free to reopen it, if you still encounter this problem!