Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why can't I open pdf files from Delphi

Status
Not open for further replies.

petertickler

Programmer
Oct 1, 2002
67
GB
I am having trouble opening a pdf file via my Delphi application, even though I am using the same
approach as I have used sucessfully to open Powerpoint, Word and Excel files.

I have set up a new form, put a Tpdf component on it, declared a private Tpdf called
NewPDFapp, and created as public open procedure which reads thus:
Code:
procedure TfmAcrobat.Open(pdfFile: OleVariant);
begin
NewPDFapp := TPdf.Create(Self);
NewPDFapp.src := pdfFile;
NewPDFapp.Visible := True;
end;

However this does not work. When I try to open a pdf file, Acrobat appears
to open, but then it disappears and the system locks up.

Any bright ideas as to why this might be happening?

Peter Tickler
 
Is this some 3rd party component? just I don't remember seeing a Tpdf component in Delphi. Robertio
Alias: Robbie Calder
Software Developer
urc@walkermartyn.co.uk
 
It comes with Delphi Enterprise. All you have to do is indstall the type library for Acrobat to access it. And I put
Code:
PdfLib_TLB
in the
Code:
uses
clause.

Peter Tickler
 
Do Adobe know about this?.
Or is it why Delphi is getting so pricey these days?
Steve..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top