-
Notifications
You must be signed in to change notification settings - Fork 9
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
Problem converting docx to pdf format A-1a #59
Comments
Hello! curl \
--request POST 'http://localhost:3000/forms/libreoffice/convert' \
--form 'files=@"/path/to/file.docx"' \
--form 'pdfFormat="PDF/A-1a"' \
-o my.pdf |
If you say problem is only with Did you try to play with Also, there are four different PDF engines in Gotenberg, did you try to use different? Not sure about it though, documentation says only |
Also looking through Gotenberg issues, I see few ones that mentioned LibreOffice and docx convertion, you can try to use different version on Gotenberg, lets say 7.4.2 |
I did try the nativePdfFormat but it always returns corrupt files. |
I guess it depends on your environment. Maybe you already have other service, listening port 80, for example nginx or your NestJS application. You can use any other free port between 1025 and 65535, just make sure Gotenberg listens that port. |
So I tested with the curl command and it is working perfectly and all the pdf are not corrupted. |
I got it, then I have to ask for more details, please :) First of all, can you create repository with minimal reproduce example, with docx files? Do you run method Can you try to replace built-in HTTP client with axios and check if it is working? Something like that (in gotenberg('', {
post(url, data, headers) {
return axios({
method: 'post',
url,
data,
headers: { ...headers },
})
}
}) (not sure it will work, |
I am not sure I will have time to do it cause this week is my last on the current mission and I am wrapping things up at the moment. |
Maybe you can give me .docx files at least 😅 And I'll try to play with them |
there is no specific docx file. any docx file would work. The tests I was making were sample docx file I made via Microsoft word. |
Thank you for this amazing library.
I have a NestJs application that has a method that communicates with a docker image of gotenberg7 via this js-client.
I need to convert docx files to pdf with an A-1a format.
What I wrote is
and the method is
This method is called multiple times because it is trying to convert multiple docx files that will be zipped later on.
When I convert to pdf without adding the pdfFormat field, it works with no errors. But when I add
pdfFormat: 'PDF/A-1a'
the files are not all converted correctly.I am testing with two files for now and one out of two is damaged and cannot be read. Every time it's a different pdf out of the two that is damaged. Sometimes both are damaged.
I am not getting why I am having this issue since one of the pdf is converted correctly and I am sending the docx twice.
The text was updated successfully, but these errors were encountered: