unit GoToAcro_Set;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, AcroPDFLib_TLB, OleCtrls, StdCtrls;
type
TForm1 =
class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
aPDF_myPDF70 : TAcroPDF;
b_myPDF70Created : boolean;
s_param_Document, s_param_Location :
string;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
s_param_Document := Paramstr(1);
s_param_Location := ParamStr(2);
try
aPDF_myPDF70 := TAcroPDF.Create(self);
aPDF_myPDF70.Parent := Form1;
aPDF_myPDF70.Align := alclient;
aPDF_myPDF70.setViewScroll('
Fit',10.0);
aPDF_myPDF70.LoadFile(s_param_Document);
if (s_param_Location >= '
0')
and (s_param_Location <= '
9')
then
aPDF_myPDF70.setCurrentPage(strtoint(s_param_Location))
else
//* hier liegt das Problem. Es wird nicht ausgeführt!!
aPDF_myPDF70.setNamedDest(s_param_Location);
b_myPDF70Created := true;
except
b_myPDF70Created := false;
aPDF_myPDF70.Free;
ShowMessage('
Keine gültigen Parameter');
end;
end;
end.