//Advanced Delphi Systems Code: ads_AcroExch_AVPageView
unit ads_AcroExch_AVPageView;
{Copyright(c)2016 Advanced Delphi Systems

 Richard Maley
 Advanced Delphi Systems
 12613 Maidens Bower Drive
 Potomac, MD 20854 USA
 phone 301-840-1554
 dickmaley@advdelphisys.com

 The code herein can be used or modified by anyone.  Please retain references
 to Richard Maley at Advanced Delphi Systems.  If you make improvements to the
 code please send your improvements to dickmaley@advdelphisys.com so that the
 entire Delphi community can benefit.  All comments are welcome.
}
(*
UnitIndex Master Index Implementation Section Download Units
Description: ads_AcroExch_AVPageView.pas
This unit contains the following routines.

Register   TAcroExch_AVPageView.DevicePointToPage  TAcroExch_AVPageView.DoGoBack   TAcroExch_AVPageView.DoGoForward   TAcroExch_AVPageView.GetAperture   TAcroExch_AVPageView.GetAVDoc   TAcroExch_AVPageView.GetDoc   TAcroExch_AVPageView.GetPage   TAcroExch_AVPageView.GetPageNum   TAcroExch_AVPageView.GetZoom   TAcroExch_AVPageView.GetZoomType   TAcroExch_AVPageView.GoTo_   TAcroExch_AVPageView.PointToDevice   TAcroExch_AVPageView.ReadPageDown   TAcroExch_AVPageView.ReadPageUp   TAcroExch_AVPageView.ScrollTo   TAcroExch_AVPageView.ZoomTo  

*)
interface
Uses
  Acrobat_TLB, Classes;

Type
  TAcroExch_AVPageView = class(TComponent)
  Private
    FAcroExch_AVPageView : Variant;
  Public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    function    DevicePointToPage(const point: IDispatch): IDispatch;
    function    DoGoBack: Integer;
    function    DoGoForward: Integer;
    function    GetAperture: IDispatch;
    function    GetAVDoc: IDispatch;
    function    GetDoc: IDispatch;
    function    GetPage: IDispatch;
    function    GetPageNum: Integer;
    function    GetZoom: Integer;
    function    GetZoomType: Smallint;
    function    GoTo_(nPage: Integer): Integer;
    function    PointToDevice(const point: IDispatch): IDispatch;
    function    ReadPageDown: Integer;
    function    ReadPageUp: Integer;
    function    ScrollTo(nX: Smallint; nY: Smallint): Integer;
    function    ZoomTo(nType: Smallint; nScale: Smallint): Integer;
  End;

  procedure Register;

implementation

Uses
  Variants, ComObj;

//
Unit Description UnitIndex Master Index
procedure Register;
begin
  RegisterComponents('Acrobat', [TAcroExch_AVPageView]);
end;

constructor TAcroExch_AVPageView.Create(AOwner: TComponent);
begin
  inherited;
  FAcroExch_AVPageView := CreateOleObject('AcroExch.AVPageView');
end;

destructor TAcroExch_AVPageView.Destroy;
begin
  FAcroExch_AVPageView := unassigned;         
  inherited;
end;

//
Unit Description UnitIndex Master Index
function TAcroExch_AVPageView.DevicePointToPage(const point: IDispatch): IDispatch;
begin
  Result := FAcroExch_AVPageView.DevicePointToPage(point);
end;

//
Unit Description UnitIndex Master Index
function TAcroExch_AVPageView.DoGoBack: Integer;
begin
  Result := FAcroExch_AVPageView.DoGoBack;
end;

//
Unit Description UnitIndex Master Index
function TAcroExch_AVPageView.DoGoForward: Integer;
begin
  Result := FAcroExch_AVPageView.DoGoForward;
end;

//
Unit Description UnitIndex Master Index
function TAcroExch_AVPageView.GetAperture: IDispatch;
begin
  Result := FAcroExch_AVPageView.GetAperture;
end;

//
Unit Description UnitIndex Master Index
function TAcroExch_AVPageView.GetAVDoc: IDispatch;
begin
  Result := FAcroExch_AVPageView.GetAVDoc;
end;

//
Unit Description UnitIndex Master Index
function TAcroExch_AVPageView.GetDoc: IDispatch;
begin
  Result := FAcroExch_AVPageView.GetDoc;
end;

//
Unit Description UnitIndex Master Index
function TAcroExch_AVPageView.GetPage: IDispatch;
begin
  Result := FAcroExch_AVPageView.GetPage;
end;

//
Unit Description UnitIndex Master Index
function TAcroExch_AVPageView.GetPageNum: Integer;
begin
  Result := FAcroExch_AVPageView.GetPageNum;
end;

//
Unit Description UnitIndex Master Index
function TAcroExch_AVPageView.GetZoom: Integer;
begin
  Result := FAcroExch_AVPageView.GetZoom;
end;

//
Unit Description UnitIndex Master Index
function TAcroExch_AVPageView.GetZoomType: Smallint;
begin
  Result := FAcroExch_AVPageView.GetZoomType;
end;

//
Unit Description UnitIndex Master Index
function TAcroExch_AVPageView.GoTo_(nPage: Integer): Integer;
begin
  Result := FAcroExch_AVPageView.GoTo_(nPage);
end;

//
Unit Description UnitIndex Master Index
function TAcroExch_AVPageView.PointToDevice(  const point: IDispatch): IDispatch;
begin
  Result := FAcroExch_AVPageView.PointToDevice(point);
end;

//
Unit Description UnitIndex Master Index
function TAcroExch_AVPageView.ReadPageDown: Integer;
begin
  Result := FAcroExch_AVPageView.ReadPageDown;
end;

//
Unit Description UnitIndex Master Index
function TAcroExch_AVPageView.ReadPageUp: Integer;
begin
  Result := FAcroExch_AVPageView.ReadPageUp;
end;

//
Unit Description UnitIndex Master Index
function TAcroExch_AVPageView.ScrollTo(nX, nY: Smallint): Integer;
begin
  Result := FAcroExch_AVPageView.ScrollTo(nX, nY);
end;

//
Unit Description UnitIndex Master Index
function TAcroExch_AVPageView.ZoomTo(nType, nScale: Smallint): Integer;
begin
  Result := FAcroExch_AVPageView.ZoomTo(nType, nScale);
end;

end.
//