Тёмный

What to look for in a PDF SDK - PDF.js vs. react-pdf - DeveloperWeek 2021 

Apryse
Подписаться 1,5 тыс.
Просмотров 21 тыс.
50% 1

I put together a presentation + repo for DeveloperWeek 2021 to help developers evaluate several different popular libraries out there and highlight some of the gotchas one might encounter.
Link to the repo: github.com/andreysaf/Develope...
What to look for in a PDF library when you are strapped for time?
Why do PDFs look different in different browsers?
Why do only some libraries offer annotation capabilities?
For each of the libraries evaluated, I created a create-react-app and embedded the viewer inside of it.
- React PDF www.npmjs.com/package/react-pdf
- PDF.js mozilla.github.io/pdf.js/
- PDF.js Express pdfjs.express/documentation
- PDFTron's WebViewer www.pdftron.com/documentation...
Introduction: (0:00)
Adding PDFs to your app: (1:15)
React-PDF: (6:35)
PDF.js: (11:00)
PDF.js Express: (14:33)
PDFTron's WebViewer: (18:20)

Наука

Опубликовано:

 

7 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 36   
@yurykiryaev329
@yurykiryaev329 3 года назад
thank you man! it's really important information
@indomitabledane3068
@indomitabledane3068 3 года назад
You are doing Gods work.
@giansingh4710
@giansingh4710 2 года назад
this video has saved my life. Thanks. Very Very clutch
@apryse-solutions
@apryse-solutions 2 года назад
Glad to hear it!
@genesisabel
@genesisabel 3 года назад
Thanks for this information
@apryse-solutions
@apryse-solutions 3 года назад
Comment here with any other libs you want me to evaluate! Let's expand this repo.
@chandbee1719
@chandbee1719 3 года назад
Can we do drag drop files in Pdftron webviwer? Because it's loading files from a specific location. But I want to know that can we drag drop files instead of placing within the solution.
@jtrenda333
@jtrenda333 2 года назад
I had a client request that a pdf that we're generating on the front end using react-pdf, be emailed to them every day, so i set up node-cron on my backend node server, but i'm not sure how to use react-pdf within that context to generate a stream that i can then send to nodemailer's attachment options. is there a way to do that?
@sneharajput3727
@sneharajput3727 Год назад
after pdf reload how highlighted text should be show, can you guide me?
@nykollemalone1280
@nykollemalone1280 3 года назад
Can I use react-pdf to render a url from my api request or other external url? Example:
@apryse-solutions
@apryse-solutions 3 года назад
As long as you configure CORS on the server that serves those files you should be good.
@maximilianomaro6230
@maximilianomaro6230 2 года назад
Hello, I just need to get page count and dimensions (width and height in mm), the PDF files are uploaded by users for print... Getting this data I'll can calculate the size of the spin in a book for example; or the number of pages that fits in a sheet...
@apryse-solutions
@apryse-solutions 2 года назад
Hello Max, that should be possible with our SDK. The page dimensions in PDF are measured in box sizes, there is a media box, crop box etc. For example API for crop box: www.pdftron.com/api/pdfnet-node/PDFNet.Page.html#getCropBox__anchor.
@KeyhanHadjari
@KeyhanHadjari 2 года назад
How are these libraries regarding PDF/A support and XFA support? Is it possible to save the user input in an XFA file when a user has filled a form?
@apryse-solutions
@apryse-solutions 2 года назад
XFA is limited support since Adobe deprecated it, now it’s acroforms. You can save of field values in XFDF. PDF/A is supported through PDFTron for creation and validation. All conformance levels. Reach out if you need further info.
@christoferi9636
@christoferi9636 9 месяцев назад
its only for view? I want to be downloadable
@JohnathanHendrix
@JohnathanHendrix 3 года назад
Do you have any videos showcasing how you can prepopulate pdfs and sign them using an existing base64 signature? I am using react and the data I would want to use for prepopulating is avaliable in the component via context.
@apryse-solutions
@apryse-solutions 3 года назад
Here you go for signatures: www.pdftron.com/documentation/web/guides/signature-tool/#importing-existing-signatures and here is one for forms: www.pdftron.com/documentation/web/guides/forms/fill-fields/.
@davidkramer6286
@davidkramer6286 2 года назад
Do you have a way to send pdf to backend or save pdf to state (React-PDF libary)
@apryse-solutions
@apryse-solutions 2 года назад
You would just do a POST request with a blob to the backend. I would be careful how you set blob to state as it might be memory heavy.
@davidkramer6286
@davidkramer6286 2 года назад
@@apryse-solutions Thnak you
@ankithap7624
@ankithap7624 3 года назад
Can you tell me how to didplay pdf of type octet/application??
@apryse-solutions
@apryse-solutions 3 года назад
You should probably convert it to a blob either in memory of browser, or ahead of time on server and then pass that to the WebViewer `instance.loadDocument(blob, {extension: 'pdf'})`
@starlord1786
@starlord1786 2 года назад
why pdf.js not accept array buffer data, can you explain to me
@apryse-solutions
@apryse-solutions 2 года назад
It seems like you can just convert it in memory?
@valerymbele4451
@valerymbele4451 3 года назад
sorry , it is not working for react. its loading all my app inside the viewer div
@apryse-solutions
@apryse-solutions 3 года назад
Hey Valery, what error are you getting?
@juancarlosmateo9409
@juancarlosmateo9409 3 года назад
@@apryse-solutions I've got the same problem. All my app its rendering into viewer div. How can I fix it??
@apryse-solutions
@apryse-solutions 3 года назад
@@juancarlosmateo9409 Which sample? pdf.js, react-pdf, pdf.js express or WebViewer?
@apryse-solutions
@apryse-solutions 3 года назад
if it is PDF.js Express or WebViewer path is incorrect.
@apryse-solutions
@apryse-solutions 3 года назад
For react-pdf, I just did a clean clone, cd react-pdf-sample, cd my-pdf-app and npm i, npm start. The page rendered correctly. Feel free to email me the issue you are seeing andrey@pdftron.com.
@mochammadchafid3922
@mochammadchafid3922 3 года назад
is pdf.js free for commercial ?
@apryse-solutions
@apryse-solutions 3 года назад
I believe pdf.js is free for commercial.
@PeterWilliams97
@PeterWilliams97 3 года назад
How much does PDFTron cost?
@apryse-solutions
@apryse-solutions 3 года назад
Hello Peter, you can fill out the form here: www.pdftron.com/form/contact-sales/
@apryse-solutions
@apryse-solutions 3 года назад
Our sales team can work with you to work out flexible licensing
Далее
How to Build a React.js PDF Viewer with PSPDFKit
10:00
Vite Crash Course | Faster Alternative To CRA
16:24
Просмотров 189 тыс.
Node.js Ultimate Beginner’s Guide in 7 Easy Steps
16:20
Render pdf, docx, xlsx, ppt etc. in react application
12:35
7 Wordpress Plugins I install on all websites (2024)
15:07
How to extract PDF Data from PDF File using PDF.js
5:40
How to create a PDF file using React.js
43:11
Просмотров 65 тыс.
I made a PDF editor using only Javascript
3:40
Просмотров 9 тыс.
Подключил AirPods к Xbox
0:45
Просмотров 5 тыс.