kestra-io / kestra

Infinitely scalable, event-driven, language-agnostic orchestration and scheduling platform to manage millions of workflows declaratively in code.
https://kestra.io
Apache License 2.0
7.02k stars 408 forks source link

Preview functionality for PDF files #4157

Open yuri1969 opened 3 days ago

yuri1969 commented 3 days ago

What changes are being made and why?

Dealing with PDF files is quite common so here is a PR attempt.

This PR added a very basic PDF viewer implemented using Mozilla's PDF.js lib.

It requires Promise.withResolvers support. However, it should be possible to use the "legacy" build of PDF.js to cover more browsers. It depends on the Kestra policy.

closes #4116 closes #4125


How the changes have been QAed?

id: pdfjs-test
namespace: company.myteam

inputs:
  - id: pdfFile
    type: FILE
    extension: .pdf

tasks:
  - id: test
    type: io.kestra.plugin.core.log.Log
    message: "This is an input test"