PDFIndexCut.dll =============== >>> This is the shareware version... >>> Try before you buy... >>> And if there're any questions - ask me. >>> Thanks for trying! You can use it with all well known ides (.NET-IDEs, too!) Try it with Visual Basic, VBA, Delphi, C, C++, ... contact: webmaster@pdf-analyzer.com info/order: http://www.pdf-analyzer.com http://www.is-soft.de Ingo Schmoekel - Software-Dev.& Distribution - Zedernstr.30a D-28832 Achim - Uesen GERMANY For the library there is a help-program to test the functions immediately: --------------------------------------------------------------------------- H_PDFIndexCut.exe As source example there is a delphi- and vb-project included: ------------------------------------------------------------- H_PDFIndexCut_delphi.zip H_PDFIndexCut_vb.zip Returning error values ---------------------- 9001 = File not found (if you're using a single file as a parameter) 9002 = No pdf-file (if you're using a single file) 9003 = Directory not found 9004 = File is too big ( > 24 mbytes ) (if you're using a single file) 9005 = Userpassword was inserted (if you're using a single file) 9006 = All pages <= IndexPageCount (if you're using a single file) 9010 = The parameter FileName was empty 9011 = The parameter -PageCount- is empty 9012 = The parameter -LinkText- is empty 9013 = The parameter -Starting at page...- is empty 9999 = Main error! (if you're using a single file) <9000 = It's okay Function with few values/parameters and the meaning of ... --------------------------------------------------------- PDFIndexCut( const FileName: PChar; The file or directory (no backslash at the end) Pbegin: LongInt; Starting at page ... Pcount: LongInt; PageCount... LinkText: PChar; The displayed linktext LPos: LongInt; Textposition on the page (1=top left, 2=top centered, 3=top right, 4=bottom left, 5=bottom centered, 6=bottom right) LCol: LongInt Textcolour (1=black, 2=white, 3=red, 4=green, 5=grey, 6=blue, 7=yellow) ): LongInt; stdcall; The returning value ( 0 means okay ) An example using the dll in a delphi unit: --------------------------------------- program dlltest; uses Forms, dlltest1 in 'dlltest1.pas' {Form1}; . . . unit dlltest1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) OpenDialog1: TOpenDialog; Edit1: TEdit; Button1: TButton; Button2: TButton; Edit2: TEdit; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private-Deklarationen } public { Public-Deklarationen } end; var Form1: TForm1; function PDFIndexCut(const FileName: PChar; Pbegin: LongInt; Pcount: LongInt; LinkText: PChar; LPos: LongInt; LCol: LongInt): LongInt; stdcall; implementation {$R *.DFM} function PDFIndexCut(const FileName: PChar; Pbegin: LongInt; Pcount: LongInt; LinkText: PChar; LPos: LongInt; LCol: LongInt): LongInt; stdcall; external 'PDFIndexCut.dll'; procedure TForm1.Button1Click(Sender: TObject); begin If OpenDialog1.Execute Then Edit1.Text := OpenDialog1.FileName; end; procedure TForm1.Button2Click(Sender: TObject); var e : Integer; begin e := PDFIndexCut(PChar(Edit1.Text),1,2,'here is the big one ...',6,1); If ( e >= 9000 ) and ( e <= 9999 ) Then Edit2.Text := 'Attention! Error ' + IntToStr(e) else Edit2.Text := IntToStr(e); end; end. An example using the dll in a visual basic module module1: ---------------------------------------------------------- . . . Public Declare Function PDFIndexCut Lib "PDFIndexCut.dll" (ByVal filename As String, ByVal Pbegin As Long, ByVal Pcount As Long, ByVal linktext As String, ByVal lpos As Long, ByVal lcol As Long) As Long . . . And the button-click to start... -------------------------------- . . . Private Sub option1_Click() Dim s As String s = "here is the big one ..." Text2.Text = PDFIndexCut(Text1.Text, 1, 1, s, 6, 1) End Sub . . .