CollaboraOnline / online

Collabora Online is a collaborative online office suite based on LibreOffice technology. This is also the source for the Collabora Office apps for iOS and Android.
https://collaboraonline.com
Other
1.8k stars 691 forks source link

Convert-to from pdf to txt fails: cmd=saveas kind=savefailed #5924

Closed UltimateByte closed 1 month ago

UltimateByte commented 1 year ago

Describe the bug Even though txt or .doc to .pdf conversion works as expected, .pdf to .txt appears to always fail.

To Reproduce

  1. Get a pdf on your coolwsd server like: wget https://sdk.collaboraonline.com/CO-SDK-manual.pdf
  2. Run a conversion like curl -F "data=@CO-SDK-manual.pdf" http://localhost:9980/cool/convert-to/txt > out.txt

Expected behavior Curl should output the resulting .txt file.

Actual behavior

  1. Curl is slowing down upload speed more and more as the upload goes
  2. Result is either a timeout or an empty reply.
  3. Logs show:
    wsd-78682-78682 2023-02-28 16:29:41.127368 +0100 [ coolwsd ] INF  WSD initialization complete: setting log-level to kit-78692-78690 2023-02-28 16:29:51.881421 +0100 [ kitbroker_001 ] ERR  ToMaster-001: error: cmd=saveas kind=savefailed| common/Session.hpp:165
    kit-78715-78690 2023-02-28 16:35:29.771886 +0100 [ kitbroker_002 ] ERR  ToMaster-002: error: cmd=saveas kind=savefailed| common/Session.hpp:165

Server Info

Additional details Config file sets max_file_size to 0 (unlimited), and my test PDF is around 2.4MB.

I remain available for further details or testing.

timur-g commented 1 year ago

I tested and reproduced but not sure if it is really expected to convert from PDF, in COOL PDF cannot be saved to other format.

UltimateByte commented 1 year ago

If the feature is missing, it would be a useful addition. Shall the feature not be added, it would be good to have a more explicit error message.

As a workaround, I use the poppler-utils (linux package) for now for this purpose.