How to use pdf.js on desktop/mobile to display a PDF
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: How to use pdf.js on desktop/mobile to display a PDF
I don't want to launch another app nor do I want to edit or process the PDFs, only display them inside of LC (browser wigdet).
With -> "Ah, yes, thank you, worth to consider!" I meant your idea to serve these files via the http lib in LC.
With -> "Ah, yes, thank you, worth to consider!" I meant your idea to serve these files via the http lib in LC.
Re: How to use pdf.js on desktop/mobile to disply a PDF
Just in case you missed it - XPDFReader lets you export each page of the PDF as a JPG.Klaus wrote: ↑Wed Apr 13, 2022 9:04 amThank you, but this is an external application, I just want to display a PDF file inside of my Livecode app.stam wrote: ↑Tue Apr 12, 2022 10:40 pmAlso, you may want to look at the opensource XPDFReader : http://www.xpdfreader.com/index.html
I've used it before to very successfully extract text from PDF files - it comes with a 'viewer' for win/linux which may be helpful if you don't need to absolutely embed the PDF. It also lets you export each page as JPG so if you wanted to could do this on the fly i guess to show the PDF as an image instead... it's got a huge number of features which i haven't really looked into so might be worth a look?
S.
Since the Windows "default" browser EDGE can display PDF files, I wonder why LC still "sticks" to the CEF stuff.
Maybe it is not as easy to wrap around their web engine as it may be on the Mac, but what do I know?!
You can do this to an intermediate/temp folder and then seamlessly import the JPG to LC.
Granted, it will be an image and not a PDF, but it may be a quick and dirty way to present the content of the PDF inside your app.
S.
Re: How to use pdf.js on desktop/mobile to display a PDF
Hm, also something to consider, thanks!
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: How to use pdf.js on desktop/mobile to display a PDF
Another idea, if you have control over the PDF, use a converter utility to change it to HTML which will display in the browser.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: How to use pdf.js on desktop/mobile to display a PDF
Hi Jaque,
the browser widget for Windows uses the CEF browser, can display PDF file,
but has a 170 MB overhead for runtimes, which I really want to avoid.
Best
Klaus
the browser widget for Windows uses the CEF browser, can display PDF file,
but has a 170 MB overhead for runtimes, which I really want to avoid.
Best
Klaus
Re: How to use pdf.js on desktop/mobile to display a PDF
I actually dropped the idea to use the browser widget on Windows for the above mentioned reason.
If I can reach the target of my crowdfunding campaign, I will probably buy the "Pro pack" which comes with the PDF widget.
If I can reach the target of my crowdfunding campaign, I will probably buy the "Pro pack" which comes with the PDF widget.
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: How to use pdf.js on desktop/mobile to display a PDF
Well, you can display HTML in a field. No browser required. Maybe you've already thought of that.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: How to use pdf.js on desktop/mobile to display a PDF
Ah, yes, again something to consider, thank you!