Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 Not found Error #39

Closed
a0yan opened this issue Jan 13, 2022 · 3 comments
Closed

404 Not found Error #39

a0yan opened this issue Jan 13, 2022 · 3 comments

Comments

@a0yan
Copy link

a0yan commented Jan 13, 2022

const {
    pipe,
    gotenberg,
    convert,
    markdown,
    office,
    to,
    landscape,
    set,
    filename,
    please,
  } = require('gotenberg-js-client')
  
  const toPDF = pipe(
    gotenberg('http://localhost:3000'),
    convert,
    office,
    to(landscape),
    set(filename('result.pdf')),
    please
  )
  
  // --- 8< ---
  
  // --- 8< ---
  
app.get('/api/convert_docs',async(req,res)=>{
   
    try {
        const pdf = await toPDF('file://mock_amikus_2.docx')
      
    } catch (error) {
        console.error(error.message)
    }
@yumauri
Copy link
Owner

yumauri commented Jan 13, 2022

Hello! Does Gotenberg listen on http://localhost:3000 and if yes — what version of Gotenberg do you use?

@yumauri
Copy link
Owner

yumauri commented Jan 17, 2022

@a0yan if you are using Gotenberg version 7.x — this library is not yet fully compatible with it.
Among other things it has changed conversion URLs, so it might cause 404 error.
Please, read this comment, I've pointed, how you can work around this problem for a while.

@a0yan
Copy link
Author

a0yan commented Jan 17, 2022

@yumauri Thanxx

@a0yan a0yan closed this as completed Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants