diegomura/react-pdf

Use main pdfkit repo

diegomura opened this issue ยท 4 comments

I'd like to remove pdfkit fork and start using https://github.com/foliojs/pdfkit again. I branched from this a long time ago for multiple reasons, so I'm not sure the lift here. It will mean for sure to add several changes in that repo, which I think it could benefit the entire community, but not sure yet what those are.

I'll keep this issue as a sort of umbrella issue where I'll capture all the differences and report progress as I tackle them. It will be a slow path.

Hey, regarding png-js bit - consider pngjs too! See my comment: #676 (comment)

Thanks! Just took a quick look, and pngjs has node deps too, meaning I'll need to fork it as for now, or have them onboard on shipping a browser build. And also convince pdfkit to adopt this. Because pdfkit already uses png-js the path towards unifying this is shorter, but I'll check what would be more convenient

@foliojs Can you kindly pitch in and add your thoughts here?

@diegomura Hi!
I am getting this error the @swc/helpers@0.4.11 with the react-pdf/render and i am using the next 13v
I do all the others way like cache clean , node module delete and reinstall and change the next version but didnt get any solution to resolve this issue
is there any way to resolved this issue

materio-mui-react-nextjs-admin-template@2.0.0 D:\alyzone\n-travel-scheduler\n_travel_web_dash
โ”œโ”€โ”ฌ @react-pdf/renderer@3.4.5
โ”‚ โ””โ”€โ”ฌ @react-pdf/font@2.5.2
โ”‚ โ””โ”€โ”ฌ fontkit@2.0.4
โ”‚ โ””โ”€โ”€ @swc/helpers@0.5.13
โ””โ”€โ”ฌ next@13.0.0
โ””โ”€โ”€ @swc/helpers@0.4.11

error - ./node_modules/fontkit/dist/browser-module.mjs:2:0
Module not found: Can't resolve '@swc/helpers/_/_define_property'

Import trace for requested module:
./node_modules/@react-pdf/font/lib/index.browser.js
./node_modules/@react-pdf/renderer/lib/react-pdf.browser.es.js
./src/pages/to/accounting/invoices/list/index.js

https://nextjs.org/docs/messages/module-not-found

save