Ian Branch 128 Posted April 14, 2023 Hi Team, D11.3. I need to be able to load a .pdf file to a TTable blob field, and display the blob/pdf on a form. I can load the .pdf to a blob field no problem, but I can't figure out how to display it. It would be nice if there was the ability to zoom in/out for viewing. I would expect the display .pdf to change as the TTable changed records. Looking for suggestions/ideas. Regards & TIA. Share this post Link to post
Alexander Sviridenkov 360 Posted April 14, 2023 HTML Office Library can display PDF, Word, Excel, Powerpoint, EPUB and other formats from any source and on any platform. Share this post Link to post
Der schöne Günther 316 Posted April 14, 2023 Why don't you just use a WebView to display the PDF? It can enable/disable zoom by gestures/touch/hotkeys, and set the general zoom level, but I think it cannot zoom in on a specific part of the PDF, like you can with two fingers on a touchscreen. 1 Share this post Link to post
Ian Branch 128 Posted April 14, 2023 1 hour ago, Der schöne Günther said: Why don't you just use a WebView to display the PDF? Customer is using Win 7. 😞 He also is still using IE and can't change that because of other Legacy applications. 😞 Share this post Link to post
Der schöne Günther 316 Posted April 14, 2023 1 minute ago, Ian Branch said: Customer is using Win 7. 😞 So what? Also, the web browser for "surfing the internet" got nothing to do with how you want to display PDF files within your application. You should get familiar with the WebView2 runtime for your trusty old TWebBrowser. I'd strongly recommend. Share this post Link to post
dwrbudr 8 Posted April 14, 2023 I haven't used that myself, but probably you could check that component: https://github.com/ahausladen/PdfiumLib Share this post Link to post
shineworld 73 Posted April 15, 2023 (edited) Check also https://www.tmssoftware.com/site/blog.asp?post=1091 or import Adobe Reader ActiveX: Just 1 minutes to integrate Reader in an empty delphi application Edited April 15, 2023 by shineworld Share this post Link to post
Ian Branch 128 Posted April 16, 2023 I have, and have looked at that, but it has too many limitations att. I need zoom in /out plus some other caabilities that I have mentioned to Bruno. Share this post Link to post
programmerdelphi2k 237 Posted April 16, 2023 (edited) hi @Ian Branch maybe the "easer way" do show your PDF or any other files (extention) registered in your browser, it would be: WebBrowser (old IDEs) or EdgeBrowser (new IDEs) some extentions (or not registered to your browser open) will be "to download file" not to show it! you know... you'll need: web kit for your browser target (im using "Microsoft.WebView2.FixedVersionRuntime.111.0.1661.54.x64.cab" library kit from MS) web DLL in your exe folder other way, would be "import a ActiveX from Adobe (for example) into your IDE and use this new component... but all target-PC needs have Adobe installed" here my sample using EdgeBrowser components in RAD 11.3 do open a PDF file ... Vcl.Edge; type TForm1 = class(TForm) EdgeBrowser1: TEdgeBrowser; Button1: TButton; procedure Button1Click(Sender: TObject); end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin EdgeBrowser1.Navigate('file://d:\p1.pdf') end; end. Edited April 16, 2023 by programmerdelphi2k Share this post Link to post