bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 58 forks source link

Vue3: PDF rendering #17163

Open severinbeauvais opened 1 year ago

severinbeauvais commented 1 year ago
severinbeauvais commented 1 year ago

@seeker25 Are you looking into this?

seeker25 commented 1 year ago

Yup, I can take this one - I think the packages are compatible already - require can be called anywhere in the code while import has to be called at the top I think. It might be possible to use a javascript shim to load in the file

image

or maybe something like this:

https://github.com/originjs/vite-plugins/tree/main/packages/vite-plugin-commonjs

https://erindoyle.dev/using-pdfjs-with-vite/

severinbeauvais commented 1 year ago

I wasn't assigning this to you as much as asking what you knew about it 😁

(I think that require needed to be called at a particular time in the code execution.)

This ticket will affect at least Create UI and Edit UI. Create an extra ticket if you want to keep them separate. Do you know of any other teams using this PDF stuff? Should CC them on this ticket.

seeker25 commented 1 year ago

I'm not too sure