web icon indicating copy to clipboard operation
web copied to clipboard

[web] Provide "Convert to PDF" Action

Open tbsbdr opened this issue 2 years ago • 11 comments

Description

User Stories

  • As a teacher who frequently works with PDFs, I would like to have a quick way to create PDFs so that I don't have to open Collabora/OnlyOffice etc. to create PDFs.

Value

  • Enhance productivity

Acceptance Criteria

  • New Context-Menu item "Convert to PDF" (Icon: file-pdf-2-line)
  • Click on the action converts the source file into a PDF
  • The converted pdf is stored in the same folder as the source file (same filename)
  • if necessary show the dialog for conflict filename resolution
  • Context menu order: above the other exotic item "Create Space.."
  • The action is available if OnlyOffice, ~Collabora or any other PDF Conversion tool~ is available *
  • ~The admin can define which conversion tool (endpoint) should be utilised~*
  • The action is available for any supported source-filetypes like docx
  • code needs to live in a dedicated extension in the web repo

* needs a generic approach in the future that works with other PDF converters; not part of this story

Note: Convertig multiple files at once and an info on about postprocessing status is not part of this story. this could be tackeled within a workfow

Please track times

Definition of ready

[ ] everybody needs to understand the value written in the user story [ ] acceptance criteria has to be defined [ ] all dependencies of the user story need to be identified [ ] feature should be seen from an end user perspective [ ] user story has to be estimated [ ] story points need to be less then 20

Definition of done

  • Functional requirements [ ] functionality described in the user story works [ ] acceptance criteria are fulfilled
  • Quality [ ] code review happened [ ] CI is green [ ] critical code received unit tests by the developer [ ] automated tests passed (if automated tests are not available, this test needs to be created and passed
  • Non-functional requirements [ ] no sonar cloud issues

Visuals

Image

tbsbdr avatar Oct 25 '23 08:10 tbsbdr

Why is this not a web only ticket if onlyoffice document server already provides and exposes this API? https://api.onlyoffice.com/editors/conversionapi

dj4oC avatar Oct 30 '23 14:10 dj4oC

This ticket is in Web repo?!

Why is this not a web only ticket if onlyoffice document server already provides and exposes this API? https://api.onlyoffice.com/editors/conversionapi

dschmidt avatar Oct 30 '23 14:10 dschmidt

@kulmann could you please add some bullets what we need from the backend for this ticket?

tbsbdr avatar Oct 30 '23 18:10 tbsbdr

@kulmann could you please add some bullets what we need from the backend for this ticket?

  • Neither web nor other clients have a clue that this API exists. We'd need a capability or something similar to announce to the clients that the API exists. In other words: OnlyOffice does not belong to the oCIS core, so it's not guaranteed that it's part of the respective deployment. How should web (or any other client) know with certainty that it's supposed to offer the pdf conversion file action?!
  • I'd expect the API to be routed through the oCIS proxy (e.g. '/convertPdf` and then forwarded to OnlyOffice) XOR the API endpoint to be announced in the aforementioned capability.

Another option would be that we develop the file action as a standalone extension. In that case we wouldn't need the capability and could rely on the web config instead. In that case we'd put even more config aspects into the hands of the admin. Doesn't look like a good idea to me nowadays. Also we would loose the chance to offer the action in all clients and would again build a web-only feature.

kulmann avatar Oct 30 '23 20:10 kulmann

Why is this not a web only ticket if onlyoffice document server already provides and exposes this API? https://api.onlyoffice.com/editors/conversionapi

See comment before. It's not about the heavy lifting of converting documents to pdfs. It's about connecting the pieces - oCIS needs to do that. Wild guessing by clients ™️ is not something we do here. The clients don't know that the API exists or how to make use of it.

kulmann avatar Oct 30 '23 20:10 kulmann

Why don't we make an extension out of it? How does the Web know that there is an app provider with OnlyOffice?

dj4oC avatar Oct 30 '23 21:10 dj4oC

I'd like to add - handling conversion server side would reduce traffic to the browser

dschmidt avatar Oct 31 '23 00:10 dschmidt

I'd like to add - handling conversion server side would reduce traffic to the browse

Why don't we make an extension out of it? How does the Web know that there is an app provider with OnlyOffice?

Well, web actually doesn’t know anything about OnlyOffice. It just lists all the available apps from the app provider. You can search the web code base. You won’t find a single line about OnlyOffice.

We can have a custom extension in another repo if there is a need for it. ;-) But this issue is about the product, not consulting, so I‘d like to go the extra mile with a little bit of backend involvement. Sprint is already full anyway.

also: edited my initial comment because I misread „extension“ as „exception“, which I was not so happy about. 😅

kulmann avatar Oct 31 '23 03:10 kulmann

I‘d like to emphasize again that this feature makes sense for all clients from a product perspective @tbsbdr - even if we only implement it for web now, we should make it possible for other clients as well. With a web only extension that would not work.

kulmann avatar Oct 31 '23 03:10 kulmann

I would like to bring this up again. Would the Extension System been capable of this today? If yes: What limitations would ease up the implementation?

dj4oC avatar May 16 '24 15:05 dj4oC

I would like to bring this up again. Would the Extension System been capable of this today?

Could you define your question a little more? I don't get the connection between the extension system and the pdf converter in general.

AlexAndBear avatar Jun 12 '24 09:06 AlexAndBear