-
Notifications
You must be signed in to change notification settings - Fork 465
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
docx to pdf, file link path error #145
Comments
Hello @erild Thank you for the well written issue!
As suggested, I've tried this:
But no luck so far! As far as I understand, I've tried to update the link in the |
I am using the gotenberg docker to convert a docx containing relative file links into a pdf.
The link path are not kept through the convertion:
For a link
file:///./annexes/dir/file.xlsx
, after convertion, the link is transformed into../../.././annexes/dir/file.xlsx
instead of./annexes/dir/file.xlsx
Expected Behavior
For a link (in the OOXML)
file:///./annexes/dir/file.xlsx
, after convertion, the link is should be./annexes/dir/file.xlsx
Current Behavior
For a link
file:///./annexes/dir/file.xlsx
, after convertion, the link is transformed into../../.././annexes/dir/file.xlsx
instead of./annexes/dir/file.xlsx
Possible Solution
Not really sure what the issue is, i haven't looked much into the code of the conversion yet. It may be due to the command used to launch the conversion (The link is correct when i use
unoconv -f pdf testing.docx
to do the conversion).Maybe launch the command from inside the temporary directory created
Steps to Reproduce (for bugs)
testing ll.pdf
testing ll.docx
I joined a docx (and the converted pdf) where the issue is visible. To reproduce:
Logs (LOG_LEVEL="DEBUG")
Not really useful here, except for the command launch to convert
Context
This is for delivering a archive containing the pdf and a list of assorted xls files which can be opened from the pdf (or the docx) instead of needing to browse through the folder to find the right one
Your Environment
I reproduced the issue with a simple
docker run --rm -p 3000:3000 -e LOG_LEVEL="DEBUG" thecodingmachine/gotenberg:6
and a curl post requestcurl --request POST --url http://localhost:3000/convert/office --header 'Content-Type: multipart/form-data' --form files=@PATH_TO_FILE/testing.docx -o ./result.pdf
The text was updated successfully, but these errors were encountered: