4 ms·
Just a pdf.js wrapper, whats so special about this?
by rickette 4y ago
Just a pdf.js wrapper, whats so special about this?
- deleted 4y ago[deleted]
- ris58h 4y agoIt's in the title. React. Everything is better with React.
- phailhaus 4y agoIf you're already using React, yes, a thin wrapper around pdf.js is very useful. Probably not useful enough to pay for the commercial license, though.
- cuddlecake 4y agoFor one, it's a wrapper in React, so no need to implement the glue code yourself if you want to integrate PDFs in your web app. Also, it appears to be feature-rich and yet easy to use for simple use cases.
- jeroenhd 4y agoIt wraps a normal Javascript library into a React component, which is very useful for many web applications. The license is probably cheaper than having a front end dev invest time into making this embedding work well. Well-built React components can be a great business if you can entice enough people to use them and provide enough support. In most desktop applications, you can probably get away with an iframe to do much of the same thing if you want an alternative. Just put up a static HTML file on your web server that loads pdf.js and takes a path to a PDF file to render and you're pretty much done. If you want to work around the annoyances iframes cause, this library is probably along the lines of what you'd build.
- Tade0 4y agoReact is basically a "State within a state" of front-end - it's so focused on single-purpose libraries that just about everything has its special, React-only equivalent. So much so, that there are people who just assume that React = front-end, even though that's very much not the case. Draft.js is a popular example of what I'm talking about - other libraries would just wrap around a WYSIWYG solution and call it a day. Also note how this PDF component is not advertised as a wrapper, but is one in reality.
- aaronmu 4y agoImplementing pdf.js is a lot of work. $199 for a decent implementation would be a steal.
- quickthrower2 4y agoAgreed, especially considering PDF utils are in the weird money extracting island inside the sea of free software. A bit like email to fax services. Or PC cleaners. Want to edit a PDF for free? That is going to be a very unpleasant experience. Counterexample is drawing programs 2D and 3D. Lots of excellent free open source software from Inkscape to Blender to Photopea.
- notpushkin 4y agoPhotopea isn't open source though.
- jamessb 4y agoI don't know. For people who want a React wrapper around pdf.js, there are open source alternatives such as react-pdf: https://github.com/wojtekmaj/react-pdf https://github.com/wojtekmaj/react-pdf