Halllöööchen,
ich hab ein Problem mit der Anwendung von ActiveX/AcroPDF.
Öffnen lässt sich die gewünschte PDF mit
Delphi-Quelltext
1:
| myPDF70.LoadFile('gewuenschteFile.pdf'); |
Aber nun möchte ich an eine gewünschte Stelle im Dokument Springen.
Dies soll laut Doku folgendermaßen ablaufen:
Zitat: |
SetNamedDest
void setNamedDest(BSTR szNamedDest);
Description
Changes the page view to the named destination in the specified string.
szNamedDest = The named destination to which the viewer will go.
|
Allerdings wird beim Öffnen des PDF die zuletzt angezeigte Seite geöffnet.
Sprich, die Zeile wird ausgeführt, jedoch die Anweisung wird nicht befolgt.
Hier mein Source zum Einblick (mit hoffentlich hilfreichen Kommentaren)

:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71:
| 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 public
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 aPDF_myPDF70.setNamedDest(s_param_Location);
b_myPDF70Created := true;
except
b_myPDF70Created := false; aPDF_myPDF70.Free; ShowMessage('Keine gültigen Parameter');
end;
end;
end. |
Kann mir jemand sagen woran dies liegen kann....
bin hier schon total am verzweifeln
LG Miss Schlumpfine
