Skip to content
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

add support for websocket urps available >= LibreOffice 24.2 #355

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

caolanm
Copy link
Contributor

@caolanm caolanm commented Oct 3, 2023

a new option alongside "pipe" and "socket" to communicate with a Collabora Online server configured to accept uno over websocket.

urp syntax is:
uno:websocket,url=

in comparison with preexisting
[uno:]socket,host=,port=
[uno:]pipe,name=

Implemented in Collabora Online with CollaboraOnline/online#6992 and supported by LibreOffice 24.2 jars with https://gerrit.libreoffice.org/c/core/+/151171

not to be confused with jodconverter's existing "remote" mode which is for collabora-online wrt to the convert-to api connection point. While "external" is the traditional socket mode which this is most similar to.

a new option alongside "pipe" and "socket" to communicate with
a Collabora Online server configured to accept uno over websocket.

urp syntax is:
uno:websocket,url=<url>

in comparison with preexisting
[uno:]socket,host=<hostname>,port=<port>
[uno:]pipe,name=<pipeName>
@sbraconnier
Copy link
Member

Thanks a lot for your contribution, I'll merge it somewhere this week for sure.

@caolanm
Copy link
Contributor Author

caolanm commented Oct 17, 2023

anything else I need to do here? I'm assuming the ci failures are unrelated

@sbraconnier sbraconnier merged commit fd81571 into jodconverter:master Dec 13, 2023
@sbraconnier
Copy link
Member

@caolanm

Could you please add a comment with a brief text explaining this new feature so I could update the configuration documentation

@caolanm
Copy link
Contributor Author

caolanm commented Dec 14, 2023

Here's what my sample code looks like to use this with a local collabora online instance running on port 9980 on localhost

ExternalOfficeManager.Builder config = ExternalOfficeManager.builder();
String wopiURI = "http://localhost:9980/wopi/files/some-sample-document.odt";
String encodedURI = URLEncoder.encode(wopiURI, StandardCharsets.UTF_8);
ExternalOfficeManager officeManager = config.websocketUrls("ws://localhost:9980/cool/" + encodedURI + "/ws").build();
officeManager.start();

And then its the same as any ExternalOfficeManager case after that. Requires the LibreOffice jars from >= 24.02 or Collabora jars from >= 23.05 and a >= 23.05 Collabora Online with "enable_websocket_urp" set to true in its coolwsd.xml where that is documented inline as "Should we enable URP (UNO remote protocol) communication over the websocket"

@caolanm caolanm deleted the libreoffice_websocket_urp branch December 14, 2023 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants