Closed roverboy773 closed 1 year ago
req.body.data:={ file: 'http://localhost:5000/files/a952e17d-aaed-4063-a771-bc726618df7f', resp: { expire_at: '2022-03-31T09:20:35.275Z', _id: '6245740e1b32170e250e910f', fileName: '1648718862144-0.9536543514182461.pdf', path: 'uploads/1648718862144-0.9536543514182461.pdf', size: 233836, uuid: 'a952e17d-aaed-4063-a771-bc726618df7f', file_owner: '61de5f132999590a308ecfdb', createdAt: '2022-03-31T09:27:42.154Z', updatedAt: '2022-03-31T09:27:42.154Z', __v: 0 } }
did you try running your code on a local file? This issue needs a lot more context!
I ran into the same issue, i was using a local file, but the thing is i was trying to convert from pdf to docx, when i converted from docx to pdf everything ran smoothly, but i couldn't figure out why it was not working the other way around.
Does the library support conversions from pdf to other formats ?
did you try running your code on a local file? This issue needs a lot more context!
yes, I used a local file, the server is running locally
I ran into the same issue, i was using a local file, but the thing is i was trying to convert from pdf to docx, when i converted from docx to pdf everything ran smoothly, but i couldn't figure out why it was not working the other way around.
Does the library support conversions from pdf to other formats ?
I haven't tried the other way out...I think the purpose of the library is to interconvert right?....rather than convert all to pdfs
I ran into the same issue, i was using a local file, but the thing is i was trying to convert from pdf to docx, when i converted from docx to pdf everything ran smoothly, but i couldn't figure out why it was not working the other way around. Does the library support conversions from pdf to other formats ?
I haven't tried the other way out...I think the purpose of the library is to interconvert right?....rather than convert all to pdfs
Yes, exactly.. that's what i thought, but when converting to pdf its working fine for me, the issue only happens when i try to convert from pdf to another format
I have also tried multiple filters thinking that maybe that's the issue but the error is still the same
Did you try opening a pdf file in libreoffice and convert it into docx? Does this work? It seems you are trying to do something which is not supported by libeeoffice. As this library only calls libeeoffice to convert files, you might want to open an issue in the libreoffice bugzilla.
You're correct, I looked this up and Libreoffice actually doesn't support such thing, do you know of such a library or open source tool that does this ? convert pdf to word ? If so please do tell me. Thanks and apologies for troubling you.
No, I don't know a library which is able to do this. You could maybe rasterize the pdf with imagemagick and convert it to a word document then. But I guess that's only a small part of possible use cases.
Hi @k163791 what's your take on this? currently wondering is this library support pdf -> to other file? or only otherformat -> pdf?
Or you found a ways with other library to convert from PDF?
Thanks
I am facing the same issue. Converting from pdf to html works. Converting to docx gives this error. Doesn't seem to be a LibreOffice issue. It swiftly converts the pdf to docx.
Error occurs when convert function is called
const path = require("path"); const fs = require("fs").promises;
output Error:Error converting file: Error: ENOENT: no such file or directory, open '/tmp/libreofficeConvert_-3947-L12WFnW9nmeG/source..docx'