unit aspPDF_TLB;

// ************************************************************************ //
// WARNING                                                                    
// -------                                                                    
// The types declared in this file were generated from data read from a       
// Type Library. If this type library is explicitly or indirectly (via        
// another type library referring to this type library) re-imported, or the   
// 'Refresh' command of the Type Library Editor activated while editing the   
// Type Library, the contents of this file will be regenerated and all        
// manual modifications will be lost.                                         
// ************************************************************************ //

// PASTLWTR : 1.2
// File generated on 06/11/2003 12:03:45 from Type Library described below.

// ************************************************************************  //
// Type Lib: C:\Lenguajes\Proyectos\ASPComponentes\aspPDF\easypdf.tlb (1)
// LIBID: {5B04A210-5C58-4F1C-904D-C80D1402616A}
// LCID: 0
// Helpfile: 
// HelpString: aspEasyPDF from MITData, S.C.P.
// DepndLst: 
//   (1) v2.0 stdole, (C:\WINNT\system32\STDOLE2.TLB)
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface

uses Windows, ActiveX, Classes, Graphics, StdVCL, Variants;
  

// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:        
//   Type Libraries     : LIBID_xxxx                                      
//   CoClasses          : CLASS_xxxx                                      
//   DISPInterfaces     : DIID_xxxx                                       
//   Non-DISP interfaces: IID_xxxx                                        
// *********************************************************************//
const
  // TypeLibrary Major and minor versions
  aspPDFMajorVersion = 2;
  aspPDFMinorVersion = 0;

  LIBID_aspPDF: TGUID = '{5B04A210-5C58-4F1C-904D-C80D1402616A}';

  IID_IEASYPDF: TGUID = '{AA59EC50-EA91-41CD-A9CC-B9CED9C13892}';
  CLASS_EASYPDF: TGUID = '{46521B1F-0A5B-4871-A4C2-FD5C9276F4C6}';

// *********************************************************************//
// Declaration of Enumerations defined in Type Library                    
// *********************************************************************//
// Constants for enum csEasyPDF
type
  csEasyPDF = TOleEnum;
const
  csPropTextFont = $00000064;
  csPropTextSize = $00000065;
  csPropTextAlign = $00000066;
  csPropTextColor = $00000067;
  csPropTextUnderLine = $00000068;
  csPropTextRender = $00000069;
  csPropTextOverGraph = $0000006A;
  csPropText3DColor = $0000006B;
  csPropText3DPos = $0000006C;
  csPropTextAngle = $0000006D;
  csPropCharSpacing = $0000006E;
  csPropWordSpacing = $0000006F;
  csPropTextEntityConv = $00000070;
  csPropAddTextWidth = $00000071;
  csPropAddText_UpdPos = $00000072;
  csPropTextVertSpace = $00000073;
  csPageMarLeft = $000000C9;
  csPageMarTop = $000000CA;
  csPageMarRight = $000000CB;
  csPageMarBottom = $000000CC;
  csPropPosX = $000000CD;
  csPropPosY = $000000CE;
  csPageNumber = $000000CF;
  csPageWidth = $000000D0;
  csPageHeight = $000000D1;
  csPageBackColor = $000000D2;
  csPageAutoAdd = $000000D3;
  csPageCount = $000000D4;
  csHTML_TRFullPage = $000000FA;
  csHTML_THeachPage = $000000FB;
  csHTML_FontName = $000000FC;
  csHTML_FontSize = $000000FD;
  csHTML_TableDraw = $000000FE;
  csHTML_ImageRatio = $000000FF;
  csPropInfoTitle = $0000012C;
  csPropInfoSubject = $0000012D;
  csPropInfoAuthor = $0000012E;
  csPropInfoCreator = $0000012F;
  csPropInfoKeywords = $00000130;
  csDocuBackColor = $00000140;
  csPropGraphWidthLine = $00000190;
  csPropGraphXAlign = $00000191;
  csPropGraphYAlign = $00000192;
  csPropGraphWZoom = $00000193;
  csPropGraphHZoom = $00000194;
  csPropGraphLineColor = $00000195;
  csPropGraphFillColor = $00000196;
  csPropGraphFilled = $00000197;
  csPropGraphBoxShadow = $00000198;
  csPropGraphShadowColor = $00000199;
  csPropGraphWidthShadow = $0000019A;
  csPropGraphBOXOnBack = $0000019B;
  csPropGraphZoom = $0000019C;
  csPropGraphBorder = $0000019D;
  csPropGraphBCText = $0000019E;
  csPropGraphBCAngle = $0000019F;
  csPropGraphDashLine = $000001A0;
  csPropGraphShadowPos = $000001A1;
  csPropGraphJPGQuality = $000001A2;
  csPropGraphImageIndex = $000001A3;
  csPropIntVer = $000001F4;
  csPropIntLZLevel = $000001F5;
  csPropIntCoord = $000001F6;
  csPropIntFitWin = $000001F7;
  csPropIntFullScreen = $000001F8;
  csPropIntProxyServer = $000001F9;
  csPropIntDebugFile = $000001FA;
  csPropIntLZDocLevel = $000001FB;
  csPropIntRelativePath = $000001FC;
  csPropIntUnicodeCheck = $000001FD;
  csPropObjDesign = $00000258;
  csPropObjBorder = $00000259;
  csPropObjBorderColor = $0000025A;
  csPropObjOptions = $0000026C;
  csPropObjOpened = $0000026D;
  csPropObjTxtMaxLen = $000002B2;
  csPropObjCbxValues = $000002DA;
  csInternalVersion = $000003E8;
  csFontStandard = $00000000;
  csFontBold = $00000001;
  csFontItalic = $00000002;
  csFontUnderline = $00000004;
  csFontStrikeOut = $00000008;
  algLeft = $00000000;
  algRight = $00000001;
  algCenter = $00000002;
  algJustified = $00000003;
  csCode_2_5_interleaved = $00000000;
  csCode_2_5_industrial = $00000001;
  csCode_2_5_matrix = $00000002;
  csCode39 = $00000003;
  csCode39Extended = $00000004;
  csCode128A = $00000005;
  csCode128B = $00000006;
  csCode128C = $00000007;
  csCode93 = $00000008;
  csCode93Extended = $00000009;
  csCodeMSI = $0000000A;
  csCodePostNet = $0000000B;
  csCodeCodabar = $0000000C;
  csCodeEAN8 = $0000000D;
  csCodeEAN13 = $0000000E;
  csCodeUPC_A = $0000000F;
  csCodeUPC_E0 = $00000010;
  csCodeUPC_E1 = $00000011;
  csCodeUPC_Supp2 = $00000012;
  csCodeUPC_Supp5 = $00000013;
  csCodeEAN128A = $00000014;
  csCodeEAN128B = $00000015;
  csCodeEAN128C = $00000016;
  lnkToURL = $00000000;
  lnkToPDF = $00000001;
  lnkDefineBookmark = $00000002;
  lnkToBookmark = $00000003;
  lnkToPosition = $00000004;
  patHeader = $00000000;
  patFooter = $00000001;
  noteIcon = $00000000;
  noteCross = $00000001;
  noteTextBoxed = $00000002;
  foButton = $00000000;
  foCheckBox = $00000001;
  foRadioButton = $00000002;
  foTextField = $00000003;
  foScrollList = $00000004;
  foComboBox = $00000005;
  aaOnMouseIn = $00000000;
  aaOnMouseOut = $00000001;
  aaOnMouseDown = $00000002;
  aaOnMouseUp = $00000003;
  aaOnFocusEnter = $00000004;
  aaOnFocusExit = $00000005;
  aaOnVisible = $00000006;
  aaOnUnVisible = $00000007;
  aaOnKeyPress = $00000008;
  aaOnDrawField = $00000009;
  aaOnValueChange = $0000000A;
  scAllowPrint = $00000004;
  scModifyContents = $00000008;
  scCopyContents = $00000010;
  scAllowNotesForms = $00000020;
  scAllowForms = $00000100;
  scExtractText = $00000200;
  scAssembleDoc = $00000400;
  scPrintQuality = $00000800;

type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  IEASYPDF = interface;
  IEASYPDFDisp = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                       
// (NOTE: Here we map each CoClass to its Default Interface)              
// *********************************************************************//
  EASYPDF = IEASYPDF;


// *********************************************************************//
// Interface: IEASYPDF
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {AA59EC50-EA91-41CD-A9CC-B9CED9C13892}
// *********************************************************************//
  IEASYPDF = interface(IDispatch)
    ['{AA59EC50-EA91-41CD-A9CC-B9CED9C13892}']
    procedure OnStartPage(const unk: IUnknown); safecall;
    procedure OnEndPage; safecall;
    procedure AddPage; safecall;
    procedure SetPropertiesPage; safecall;
    procedure Save(const FileName: WideString); safecall;
    procedure AddTextPos(xPos: Double; yPos: Double; const Text: WideString); safecall;
    procedure AddText(const Text: WideString); safecall;
    procedure SetProperty(Property_: Integer; const Value: WideString); safecall;
    function GetProperty(Property_: Integer): WideString; safecall;
    procedure AddBox(xPos: Double; yPos: Double; xBot: Double; yBot: Double); safecall;
    procedure AddLine(xPos: Double; yPos: Double; xBot: Double; yBot: Double); safecall;
    function Get_Debug: WordBool; safecall;
    procedure Set_Debug(Value: WordBool); safecall;
    function Get_Version: WideString; safecall;
    function Get_NVersion: Integer; safecall;
    function AddGraphic(const FileName: WideString): WordBool; safecall;
    function AddGraphicPos(xPos: Double; yPos: Double; const FileName: WideString): WordBool; safecall;
    procedure Page(const Page: WideString; Orientation: Integer); safecall;
    function cnvUnitmm(number: Double): Double; safecall;
    function SaveStream: PChar; safecall;
    procedure SetMargins(Left: Double; Right: Double; Top: Double; Bottom: Double); safecall;
    procedure SetPos(X: Double; Y: Double); safecall;
    procedure BinaryWrite; safecall;
    function Get_Lic_Debug: WordBool; safecall;
    procedure Set_Lic_Debug(Value: WordBool); safecall;
    function GetTextWidth(const Text: WideString): Double; safecall;
    function License(const LicenseFile: WideString): WordBool; safecall;
    function cnvUnitInch(number: Double): Double; safecall;
    procedure SetFont(const FontName: WideString; Size: Integer; const Color: WideString); safecall;
    procedure PageSize(Width: Double; Height: Double; Orientation: Integer); safecall;
    procedure AddHTML(const Text: WideString); safecall;
    procedure AddHTMLPos(xPos: Double; yPos: Double; const Text: WideString); safecall;
    function SetTrueTypeFont(const FontName: WideString; const TrueTypeFont: WideString; 
                             Parameters: Smallint; Embended: Smallint): WordBool; safecall;
    procedure AddBarCode(xPos: Double; yPos: Double; BCHeight: Double; BCType: Integer; 
                         const BCText: WideString); safecall;
    function AddLinkPos(xPos: Double; yPos: Double; const Text: WideString; const URL: WideString; 
                        Parameters: Integer): WideString; safecall;
    function AddLink(const Text: WideString; const URL: WideString; Parameters: Integer): WideString; safecall;
    procedure Create; safecall;
    procedure Set_SiteLicense(const Param1: WideString); safecall;
    function MoveToPage(PageNr: Integer): WordBool; safecall;
    procedure AddTextWidth(xPos: Double; yPos: Double; Width: Double; const Text: WideString); safecall;
    function GetTextHeight(const Text: WideString): Double; safecall;
    function GetBarCodeWidth(BCType: Integer; const BCText: WideString): Double; safecall;
    function SaveString: WideString; safecall;
    function AddFont(const FontName: WideString; const SetFont: WideString; 
                     const encoding: WideString; Parameters: Smallint; Embedded: Smallint): WordBool; safecall;
    function Get_PosXCursor: Double; safecall;
    procedure Set_PosXCursor(Value: Double); safecall;
    function Get_PosYCursor: Double; safecall;
    procedure Set_PosYCursor(Value: Double); safecall;
    function Get_PageNumber: Integer; safecall;
    procedure Set_PageNumber(Value: Integer); safecall;
    function Get_PageCount: Integer; safecall;
    procedure AddEllipse(X1: Double; Y1: Double; X2: Double; Y2: Double); safecall;
    function AddNote(X: Double; Y: Double; const Title: WideString; const Memo: WideString; 
                     const Date: WideString; Kind: Integer): WideString; safecall;
    function AddOutline(const ptr: WideString; const Title: WideString; const Dest: WideString; 
                        Kind: Integer): WideString; safecall;
    procedure grph_AddToContents(const Value: WideString); safecall;
    procedure grph_InitDraw; safecall;
    procedure grph_EndDraw; safecall;
    procedure grph_MoveTo(X: Double; Y: Double); safecall;
    procedure grph_LineTo(X: Double; Y: Double); safecall;
    procedure grph_CurveToC(X1: Double; Y1: Double; X2: Double; Y2: Double; x3: Double; y3: Double); safecall;
    procedure grph_CurveToV(X2: Double; Y2: Double; x3: Double; y3: Double); safecall;
    procedure grph_CurveToY(X1: Double; Y1: Double; x3: Double; y3: Double); safecall;
    procedure AddFormObj(X: Double; Y: Double; X1: Double; Y1: Double; const Nombre: WideString; 
                         const Title: WideString; const Hint: WideString; ObjType: Integer); safecall;
    procedure AddFDFValue(const Nombre: WideString; const Value: WideString); safecall;
    procedure AddEventObj(EType: Integer; const ObjName: WideString; const Script: WideString; 
                          const ScriptLanguage: WideString); safecall;
    procedure AddProtection(const ownerpass: WideString; const userpass: WideString; 
                            Key_Length: Integer; flags: Integer); safecall;
    function SetPropObj(const Nombre: WideString; PropertyID: Integer; const Value: WideString): WordBool; safecall;
    procedure AddBoxRounded(xPos: Double; yPos: Double; xBot: Double; yBot: Double; Size: Double); safecall;
    procedure SaveFDF(const FileName: WideString; const PDFFileName: WideString); safecall;
    procedure BinaryWriteFDF(const PDFFileName: WideString); safecall;
    function LoadVEPFile(const FileName: WideString): WordBool; safecall;
    procedure DrawVEP(PageNr: Integer); safecall;
    procedure AddPattern(PatType: Integer; FromPage: Integer; ToPage: Integer; YOffset: Integer; 
                         const Text: WideString); safecall;
    property Debug: WordBool read Get_Debug write Set_Debug;
    property Version: WideString read Get_Version;
    property NVersion: Integer read Get_NVersion;
    property Lic_Debug: WordBool read Get_Lic_Debug write Set_Lic_Debug;
    property SiteLicense: WideString write Set_SiteLicense;
    property PosXCursor: Double read Get_PosXCursor write Set_PosXCursor;
    property PosYCursor: Double read Get_PosYCursor write Set_PosYCursor;
    property PageNumber: Integer read Get_PageNumber write Set_PageNumber;
    property PageCount: Integer read Get_PageCount;
  end;

// *********************************************************************//
// DispIntf:  IEASYPDFDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {AA59EC50-EA91-41CD-A9CC-B9CED9C13892}
// *********************************************************************//
  IEASYPDFDisp = dispinterface
    ['{AA59EC50-EA91-41CD-A9CC-B9CED9C13892}']
    procedure OnStartPage(const unk: IUnknown); dispid 1;
    procedure OnEndPage; dispid 2;
    procedure AddPage; dispid 3;
    procedure SetPropertiesPage; dispid 4;
    procedure Save(const FileName: WideString); dispid 5;
    procedure AddTextPos(xPos: Double; yPos: Double; const Text: WideString); dispid 6;
    procedure AddText(const Text: WideString); dispid 7;
    procedure SetProperty(Property_: Integer; const Value: WideString); dispid 8;
    function GetProperty(Property_: Integer): WideString; dispid 9;
    procedure AddBox(xPos: Double; yPos: Double; xBot: Double; yBot: Double); dispid 10;
    procedure AddLine(xPos: Double; yPos: Double; xBot: Double; yBot: Double); dispid 11;
    property Debug: WordBool dispid 12;
    property Version: WideString readonly dispid 13;
    property NVersion: Integer readonly dispid 14;
    function AddGraphic(const FileName: WideString): WordBool; dispid 15;
    function AddGraphicPos(xPos: Double; yPos: Double; const FileName: WideString): WordBool; dispid 16;
    procedure Page(const Page: WideString; Orientation: Integer); dispid 17;
    function cnvUnitmm(number: Double): Double; dispid 18;
    function SaveStream: {??PChar}OleVariant; dispid 19;
    procedure SetMargins(Left: Double; Right: Double; Top: Double; Bottom: Double); dispid 20;
    procedure SetPos(X: Double; Y: Double); dispid 21;
    procedure BinaryWrite; dispid 22;
    property Lic_Debug: WordBool dispid 23;
    function GetTextWidth(const Text: WideString): Double; dispid 24;
    function License(const LicenseFile: WideString): WordBool; dispid 25;
    function cnvUnitInch(number: Double): Double; dispid 26;
    procedure SetFont(const FontName: WideString; Size: Integer; const Color: WideString); dispid 27;
    procedure PageSize(Width: Double; Height: Double; Orientation: Integer); dispid 28;
    procedure AddHTML(const Text: WideString); dispid 29;
    procedure AddHTMLPos(xPos: Double; yPos: Double; const Text: WideString); dispid 30;
    function SetTrueTypeFont(const FontName: WideString; const TrueTypeFont: WideString; 
                             Parameters: Smallint; Embended: Smallint): WordBool; dispid 31;
    procedure AddBarCode(xPos: Double; yPos: Double; BCHeight: Double; BCType: Integer; 
                         const BCText: WideString); dispid 33;
    function AddLinkPos(xPos: Double; yPos: Double; const Text: WideString; const URL: WideString; 
                        Parameters: Integer): WideString; dispid 34;
    function AddLink(const Text: WideString; const URL: WideString; Parameters: Integer): WideString; dispid 32;
    procedure Create; dispid 35;
    property SiteLicense: WideString writeonly dispid 38;
    function MoveToPage(PageNr: Integer): WordBool; dispid 37;
    procedure AddTextWidth(xPos: Double; yPos: Double; Width: Double; const Text: WideString); dispid 39;
    function GetTextHeight(const Text: WideString): Double; dispid 40;
    function GetBarCodeWidth(BCType: Integer; const BCText: WideString): Double; dispid 41;
    function SaveString: WideString; dispid 42;
    function AddFont(const FontName: WideString; const SetFont: WideString; 
                     const encoding: WideString; Parameters: Smallint; Embedded: Smallint): WordBool; dispid 43;
    property PosXCursor: Double dispid 44;
    property PosYCursor: Double dispid 45;
    property PageNumber: Integer dispid 47;
    property PageCount: Integer readonly dispid 48;
    procedure AddEllipse(X1: Double; Y1: Double; X2: Double; Y2: Double); dispid 49;
    function AddNote(X: Double; Y: Double; const Title: WideString; const Memo: WideString; 
                     const Date: WideString; Kind: Integer): WideString; dispid 50;
    function AddOutline(const ptr: WideString; const Title: WideString; const Dest: WideString; 
                        Kind: Integer): WideString; dispid 51;
    procedure grph_AddToContents(const Value: WideString); dispid 46;
    procedure grph_InitDraw; dispid 52;
    procedure grph_EndDraw; dispid 53;
    procedure grph_MoveTo(X: Double; Y: Double); dispid 54;
    procedure grph_LineTo(X: Double; Y: Double); dispid 55;
    procedure grph_CurveToC(X1: Double; Y1: Double; X2: Double; Y2: Double; x3: Double; y3: Double); dispid 56;
    procedure grph_CurveToV(X2: Double; Y2: Double; x3: Double; y3: Double); dispid 57;
    procedure grph_CurveToY(X1: Double; Y1: Double; x3: Double; y3: Double); dispid 58;
    procedure AddFormObj(X: Double; Y: Double; X1: Double; Y1: Double; const Nombre: WideString; 
                         const Title: WideString; const Hint: WideString; ObjType: Integer); dispid 59;
    procedure AddFDFValue(const Nombre: WideString; const Value: WideString); dispid 60;
    procedure AddEventObj(EType: Integer; const ObjName: WideString; const Script: WideString; 
                          const ScriptLanguage: WideString); dispid 61;
    procedure AddProtection(const ownerpass: WideString; const userpass: WideString; 
                            Key_Length: Integer; flags: Integer); dispid 62;
    function SetPropObj(const Nombre: WideString; PropertyID: Integer; const Value: WideString): WordBool; dispid 63;
    procedure AddBoxRounded(xPos: Double; yPos: Double; xBot: Double; yBot: Double; Size: Double); dispid 64;
    procedure SaveFDF(const FileName: WideString; const PDFFileName: WideString); dispid 65;
    procedure BinaryWriteFDF(const PDFFileName: WideString); dispid 66;
    function LoadVEPFile(const FileName: WideString): WordBool; dispid 201;
    procedure DrawVEP(PageNr: Integer); dispid 202;
    procedure AddPattern(PatType: Integer; FromPage: Integer; ToPage: Integer; YOffset: Integer; 
                         const Text: WideString); dispid 203;
  end;

// *********************************************************************//
// The Class CoEASYPDF provides a Create and CreateRemote method to          
// create instances of the default interface IEASYPDF exposed by              
// the CoClass EASYPDF. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CoEASYPDF = class
    class function Create: IEASYPDF;
    class function CreateRemote(const MachineName: string): IEASYPDF;
  end;

implementation

uses ComObj;

class function CoEASYPDF.Create: IEASYPDF;
begin
  Result := CreateComObject(CLASS_EASYPDF) as IEASYPDF;
end;

class function CoEASYPDF.CreateRemote(const MachineName: string): IEASYPDF;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_EASYPDF) as IEASYPDF;
end;

end.
