[FR] PDF conversion
Description
It would be nice to have a generic PDF conversion endpoint, which I can call with a source fileId, and optionally a target location and a target filename. With this, the Web-UI could introduce a file action (available e.g. in the context menu) to convert certain supported files into PDFs. In a later iteration this could also support more attributes like orientation of the document, etc.
User Stories
-
As a user, I want to convert a .docx file (or any other file that makes sense to be converted to PDF) into a PDF document so that I can send it via email.
Value
Convenient PDF conversion.
Acceptance Criteria
- backend has an API endpoint for PDF conversion
fileIdfor source document- optionally
destination, if not specified use the same folder where the source document is located - optionally
fileName, if not specified use the same file name as the source document with the file extension being replaced by.pdf - prevent file name clashes by appending a suffix to the file name if needed (
secret document (1).pdf)
- backend announces via a capability:
- supported mime types for PDF conversion
- endpoint url
please specify more AC as needed
Definition of ready
- [ ] Everybody needs to understand the value written in the user story
- [ ] Acceptance criteria have to be defined
- [ ] All dependencies of the user story need to be identified
- [ ] Feature should be seen from an end user perspective
- [ ] Story has to be estimated
- [ ] Story points need to be less than 20
Definition of done
- Functional requirements
- [ ] Functionality described in the user story works
- [ ] Acceptance criteria are fulfilled
- Quality
- [ ] Code review happened
- [ ] CI is green (that includes new and existing automated tests)
- [ ] Critical code received unit tests by the developer
- Non-functional requirements
- [ ] No sonar cloud issues
- Configuration changes
- [ ] The next branch of the OpenCloud charts is compatible
I love it, but would consider to go one step beyond and build the endpoint that it takes a general mime type to convert the source file to. And if that works, it creates the converted file, and if not, it returns with an error code.
How could the webclient (and other consumers) learn which conversions are available for a certain source mime type?