I want to display PDF files on my Delphi 5 Interface (Delphi Form). On
Button click I have the below code:
URL := 'file://' + lblDocFullName.Caption;
Flags := navNoHistory or navNoReadFromCache or navNoWriteToCache;
wbPreview.Navigate(WideString(URL), Flags);
while wbPreview.ReadyState <> READYSTATE_COMPLETE do
begin
Application.ProcessMessages;
Sleep(0);
end;
it works fine and the TWebBrowser opens the pdf file correctly as
InternetExplorer does. My problem is that It also display the PDF ToolBar
same like InternetExplorer. We have a button "Show\Hide toolbar" below the
opened PDF file that can hide the PDF toolbar. But it is only for that
Document, If we open another document that also comes with the toolbar.
Is there any way that I can hide the PDF Toolbar in my application? Please
advice me.
Regards
Prabhat
I googled for "acrobat hide toolbar internet explorer" and came up with
the following:
It's a bug:
- set the openprefs to 'full-screen' and the toolbar is gone.
- try "document.pdf#toolbar=0" in your HTML
also
You can hide the toolbar using this syntax:
<http://www.myWeb.com/myFile.pdf#toolbar=0>
In the full version of Arobat also check the file>document
properties>open options dialog box.
Hope this helps!
> I want to display PDF files on my Delphi 5 Interface (Delphi Form). On
> Button click I have the below code:
Why don't you just embed the Acrobat Reader control directly?
--
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com
Thanks for the reply. Can you please guide me to do that. I think I can
import the adobe acrobat reader dll or ocx to make use of that but not sure.
I will also try.
Reg. TWebBrowser: If I use the webbrowser component I can handle many other
file types (like .jpg etc) along with PDF file types. But my current
requrement is only PDF. It will be helpful for me if you can guide me on
your suggestion.
Thanks
Prabhat
"Marc Rohloff [TeamB]" <"on request"> wrote in message
news:19764d3l...@dlg.marcrohloff.com...
I have imported the Acrobat Reader control onto delphi 5 and used the
control to load the pdf using below code:
sFileName := 'D:\ScanDocs\DataWarehouse.pdf';
AcroPDF1.LoadFile(WideString(sFileName));
But still i get the toolbar. any idea?
Thanks
Prabhat
"Marc Rohloff [TeamB]" <"on request"> wrote in message
news:19764d3l...@dlg.marcrohloff.com...
Take a look at the generated unit. You should find the following method:
procedure setShowToolbar(On_: WordBool);
Warning 1: This method doesn't allways react as you maybe expect. It
could be possible that you must call it two times.
Warning 2: If I take a look at the name - AcroPDF - I came to the
conclusion that you imported the Acrobat Reader control version 7. There
was a little change between version 4 to 6 and 7, the type library and
some GUIDs have changed. So if you want to run your program on others
systems with older versions of the control you should test it carefully.
We create the control dynamic and uses one type library for version 4
to 6 and another type library for version 7. In order to handle this
circumstance we wrote a wrapper class.
Warning 3: If you use version 7 of the control it doesn't react
allways on size changes. For example if you put the control on a form
and set the property Align to alClient, it could happen that the control
don't change it's size if you change the form size.
Hth,
Björn
--
Björn Schreiber, DRIGUS GmbH
new...@drigus.de
Bei Email NOSPAM in den Betreff aufnehmen.
Put NOSPAM in subject to reach me by email.
You have given a very good information on the subject. Thanks for that. I
know that my clients uses Ver 6x in theier PC I have 7x in my PC So as per
your advice I need to test all the circumstances before I give program.
Thanks
Prabhat
"Björn Schreiber" <new...@drigus.de> wrote in message
news:450a...@newsgroups.borland.com...
Can you please suggest some sample code where I can do all in run time for
<7x or >= 7x versions?
Also How can I clear the document that I have loaded in the control?
Thanks
Prabhat