You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our use case, password protected documents are quite common. People try to preview them, and the lambda conversion function fails because obviously the files are encrypted. I do believe that it's expected behavior for these conversions to fail, but fail in a user-friendly manner.
Currently, this case ends up in a JS error: Cannot read property '1' of null
It's thrown by this line of code
Because output of soffice --convert-to command outputs some error instead of converted file path
I might provide a pull request to somehow avoid this in the near future. I think the easiest solution would to find an easy way of finding out whether a file is encrypted or not, but a quick google search did not help me out. Perhaps somebody else has a better solution ?
EDIT: I noticed there has already been an issue regarding this problem, but hopefully I or somebody else will come up with a solution this time. #28
The text was updated successfully, but these errors were encountered:
Hi @tadasauciunas . My ask is a little different from the one you posted but on the same subject. I want to know the parameter to pass the "password" in the soffice command so that the word document opens and converts to a pdf. Currently, all my docs without passwords work fine except for the ones with passwords.
In our use case, password protected documents are quite common. People try to preview them, and the lambda conversion function fails because obviously the files are encrypted. I do believe that it's expected behavior for these conversions to fail, but fail in a user-friendly manner.
Currently, this case ends up in a JS error:
Cannot read property '1' of null
It's thrown by this line of code
aws-lambda-libreoffice/src/logs.ts
Line 2 in ab4dde6
Because output of
soffice --convert-to
command outputs some error instead of converted file pathI might provide a pull request to somehow avoid this in the near future. I think the easiest solution would to find an easy way of finding out whether a file is encrypted or not, but a quick google search did not help me out. Perhaps somebody else has a better solution ?
EDIT: I noticed there has already been an issue regarding this problem, but hopefully I or somebody else will come up with a solution this time. #28
The text was updated successfully, but these errors were encountered: