PDFlayout Plus ============== PDFlayout.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++, ... For the library there is a help-program to test the functions immediately: --------------------------------------------------------------------------- H_PDFlayout.exe As source example there is a delphi- and vb-project included: ------------------------------------------------------------- H_PDFlayout_plus_delphi.zip H_PDFlayout_plus_vb.zip 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 Kinds of returned error codes: ------------------------------ 9001 = File not found 9002 = No pdf-file 9101 = Because the file size is more than 25 mb the asked value can't be detected. This restriction isn't valid for: GetPDFColourStyle, GetPDFPageLayout, GetPDFPageMode and GetPDFeFonts. functions with the type of values, values and the meaning: ---------------------------------------------------------- GetPDFPageCount (FileName: PChar): LongInt PageCount GetPDFFormat (FileName: PChar; Page: LongInt): LongInt Documentformat (1=Portrait/0=Landscape) GetPDFPageWidth (FileName: PChar; Page: LongInt): LongInt Documentwidth (Pixel) GetPDFPageHeight (FileName: PChar; Page: LongInt): LongInt Documentheight (Pixel) GetPDFColourStyle (FileName: PChar; Page: LongInt): LongInt Colourscheme (0=Nothing/1=RGB/2=CMYK/3=Gray/4=Unknown) GetPDFLayerCount (FileName: PChar; Page: LongInt): LongInt Layercount/Documentlevels GetPDFPageLayout (FileName: PChar; Page: LongInt): LongInt Pagelayout (0=Nothing/1=SinglePage/2=OneColumn/3=TwoColumnLeft/4=TwoColumnRight) GetPDFPageMode (FileName: PChar; Page: LongInt): LongInt Pagemode (0=Nothing/1=UseNone/2=UseOutlines/3=UseThumbs/4=Fullscreen) GetPDFeFonts (FileName: PChar; Page: LongInt): PChar embedded fonts (The names are separated by #10#13) With the new parameter "Page: LongInt" you can specify detailed for example from which page you want the LayerCount...!!! If here is a 0, you'll get the value for the whole document. Sample for delphi: Including 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 GetPDFFormat(const FileName: PChar; Page: LongInt): LongInt; stdcall; function GetPDFeFonts(const FileName: PChar; Page: LongInt): PChar; stdcall; implementation {$R *.DFM} function GetPDFFormat(const FileName: PChar; Page: LongInt): LongInt; stdcall; external 'PDFlayout.dll'; function GetPDFeFonts(const FileName: PChar; Page: LongInt): PChar; stdcall; external 'PDFlayout.dll'; procedure TForm1.Button1Click(Sender: TObject); begin If OpenDialog1.Execute Then Edit1.Text := OpenDialog1.FileName; end; procedure TForm1.Button2Click(Sender: TObject); var s : LongInt; begin Edit2.Text := IntToStr(GetPDFFormat(PChar(Edit1.Text), 2)); //Example... Page 2 will be examined Edit3.Text := IntToStr(GetPDFeFonts(PChar(Edit1.Text), 2)); //Example... Page 2 will be examined end; end. Sample for visual basic: Including the dll in a bas-modul --------------------------------------------------------- . . . Public Declare Function GetPDFeFonts Lib "PDFlayout.dll" (ByVal Filename As String, ByVal Page As Long) As String Public Declare Function GetPDFFormat Lib "PDFlayout.dll" (ByVal Filename As String, ByVal Page As Long) As Long . . . Now the button-clicks... ------------------------ . . . Private Sub option1_Click() Text2.Text = GetPDFFormat(Text1.Text, 1) End Sub Private Sub option2_Click() Text2.Text = GetPDFeFonts(Text1.Text, 2) End Sub . . .