Topic: Display PDF files

Dear ALL
I would like to know a way to display PDF file inside the form.
Thanks

Re: Display PDF files

Hello,


You can do it using TWebBrowser, please download this version:
https://www.dropbox.com/s/ul1rf42j31big … a.zip?dl=0


in the beta version you can create TWebBrowser only using the script, example:

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
var
    Web: TWebBrowser;
begin
    Web := TWebBrowser.Create(Form1);
    TWinControl(Web).Parent := Form1;
    Web.Width := Form1.Width;
    Web.Height := Form1.Height;

    Web.Navigate('c:\document.pdf');
end;
Dmitry.

Re: Display PDF files

Dear Dmitri
Thank you so much for your kind help.
But, as I am new to MVD, could you please upload a small example to explain your idea more
My best regards

Re: Display PDF files

Hello smoustafa,


Here is a quick example opening a web page in a new form.


You can set URL of pdf document as variables of course, this is just a hard coded example.


@Dmitry : Well done for the addition !! That's awesome !!


Cheers



Mathias

Post's attachments

Attachment icon TWebBrowser.zip 332.63 kb, 472 downloads since 2015-12-06 

I'm a very good housekeeper !
Each time I get a divorce, I keep the house

Zaza Gabor