//
unit ads_AcroExch_AVDoc;
{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 UnitsDescription: ads_AcroExch_AVDoc.pas This unit contains the following routines.
Register TAcroExch_AVDoc.BringToFront TAcroExch_AVDoc.ClearSelection TAcroExch_AVDoc.Close TAcroExch_AVDoc.FindText TAcroExch_AVDoc.GetAVPageView TAcroExch_AVDoc.GetFrame TAcroExch_AVDoc.GetPDDoc TAcroExch_AVDoc.GetTitle TAcroExch_AVDoc.GetViewMode TAcroExch_AVDoc.IsValid TAcroExch_AVDoc.Maximize TAcroExch_AVDoc.Open TAcroExch_AVDoc.OpenInWindow TAcroExch_AVDoc.OpenInWindowEx TAcroExch_AVDoc.PrintPages TAcroExch_AVDoc.PrintPagesEx TAcroExch_AVDoc.PrintPagesSilent TAcroExch_AVDoc.PrintPagesSilentEx TAcroExch_AVDoc.SetFrame TAcroExch_AVDoc.SetTextSelection TAcroExch_AVDoc.SetTitle TAcroExch_AVDoc.SetViewMode TAcroExch_AVDoc.ShowTextSelect
*)
interface
Uses
Acrobat_TLB, Classes;
Type
TAcroExch_AVDoc = class(TComponent) //zzz
Private
FAcroExch_AVDoc : Variant; //zzz
Public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function BringToFront: Integer;
function ClearSelection: Integer;
function Close(bNoSave: Integer): Integer;
function FindText(const szText: WideString; bCaseSensitive: Integer; bWholeWordsOnly: Integer;bReset: Integer): Integer;
function GetAVPageView: IDispatch;
function GetFrame: IDispatch;
function GetPDDoc: IDispatch;
function GetTitle: WideString;
function GetViewMode: Integer;
function IsValid: Integer;
function Maximize(bMaxSize: Integer): Integer;
function Open(const szFullPath: WideString; const szTempTitle: WideString): Integer;
function OpenInWindow(const szFullPath: WideString; hWnd: Smallint): Integer;
function OpenInWindowEx(const szFullPath: WideString; hWnd: Integer; openFlgs: Integer;UseOpenParams: Integer; pgNum: Integer; pageMode: Smallint;ZoomType: Smallint; Zoom: Integer; Top: Smallint; Left: Smallint): Integer;
function PrintPages(nFirstPage: Integer; nLastPage: Integer; nPSLevel: Integer;bBinaryOk: Integer; bShrinkToFit: Integer): Integer;
function PrintPagesEx(nFirstPage: Integer; nLastPage: Integer; nPSLevel: Integer;bBinaryOk: Integer; bShrinkToFit: Integer; bReverse: Integer;bFarEastFontOpt: Integer; bEmitHalftones: Integer; iPageOption: Integer): Integer;
function PrintPagesSilent(nFirstPage: Integer; nLastPage: Integer; nPSLevel: Integer;bBinaryOk: Integer; bShrinkToFit: Integer): Integer;
function PrintPagesSilentEx(nFirstPage: Integer; nLastPage: Integer; nPSLevel: Integer;bBinaryOk: Integer; bShrinkToFit: Integer; bReverse: Integer;bFarEastFontOpt: Integer; bEmitHalftones: Integer;iPageOption: Integer): Integer;
function SetFrame(const rect: IDispatch): Integer;
function SetTextSelection(const iAcroPDTextSelect: IDispatch): Integer;
function SetTitle(const szTitle: WideString): Integer;
function SetViewMode(nType: Integer): Integer;
function ShowTextSelect: Integer;
End;
procedure Register;
implementation
Uses
Variants, ComObj;
//Unit Description UnitIndex Master Index
procedure Register;
begin
RegisterComponents('Acrobat', [TAcroExch_AVDoc]); //zzz
end;
constructor TAcroExch_AVDoc.Create(AOwner: TComponent); //zzz
begin
inherited;
FAcroExch_AVDoc := CreateOleObject('AcroExch.AVDoc'); //zzz
end;
destructor TAcroExch_AVDoc.Destroy; //zzz
begin
FAcroExch_AVDoc := unassigned; //zzz
inherited;
end;
//Unit Description UnitIndex Master Indexfunction TAcroExch_AVDoc.BringToFront: Integer; begin Result := FAcroExch_AVDoc.BringToFront; end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.ClearSelection: Integer; begin Result := FAcroExch_AVDoc.ClearSelection; end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.Close(bNoSave: Integer): Integer; begin Result := FAcroExch_AVDoc.Close(bNoSave); end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.FindText(const szText: WideString; bCaseSensitive, bWholeWordsOnly, bReset: Integer): Integer; begin Result := FAcroExch_AVDoc.FindText(szText,bCaseSensitive,bWholeWordsOnly,bReset); end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.GetAVPageView: IDispatch; begin Result := FAcroExch_AVDoc.GetAVPageView; end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.GetFrame: IDispatch; begin Result := FAcroExch_AVDoc.GetFrame; end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.GetPDDoc: IDispatch; begin Result := FAcroExch_AVDoc.GetPDDoc; end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.GetTitle: WideString; begin Result := FAcroExch_AVDoc.GetTitle; end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.GetViewMode: Integer; begin Result := FAcroExch_AVDoc.GetViewMode; end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.IsValid: Integer; begin Result := FAcroExch_AVDoc.IsValid; end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.Maximize(bMaxSize: Integer): Integer; begin Result := FAcroExch_AVDoc.Maximize(bMaxSize); end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.Open(const szFullPath, szTempTitle: WideString): Integer; begin Result := FAcroExch_AVDoc.Open(szFullPath, szTempTitle); end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.OpenInWindow(const szFullPath: WideString;hWnd: Smallint): Integer; begin Result := FAcroExch_AVDoc.OpenInWindow(szFullPath,hWnd); end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.OpenInWindowEx(const szFullPath: WideString; hWnd, openFlgs, UseOpenParams, pgNum: Integer; pageMode, ZoomType: Smallint; Zoom: Integer; Top, Left: Smallint): Integer; begin Result := FAcroExch_AVDoc.OpenInWindowEx(szFullPath,hWnd,openFlgs,UseOpenParams,pgNum,pageMode,ZoomType,Zoom,Top,Left); end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.PrintPages(nFirstPage, nLastPage, nPSLevel,bBinaryOk, bShrinkToFit: Integer): Integer; begin Result := FAcroExch_AVDoc.PrintPages(nFirstPage,nLastPage,nPSLevel,bBinaryOk,bShrinkToFit); end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.PrintPagesEx(nFirstPage, nLastPage, nPSLevel,bBinaryOk, bShrinkToFit, bReverse, bFarEastFontOpt, bEmitHalftones, iPageOption: Integer): Integer; begin Result := FAcroExch_AVDoc.PrintPagesEx(nFirstPage,nLastPage,nPSLevel,bBinaryOk,bShrinkToFit,bReverse,bFarEastFontOpt,bEmitHalftones,iPageOption); end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.PrintPagesSilent(nFirstPage, nLastPage, nPSLevel, bBinaryOk, bShrinkToFit: Integer): Integer; begin Result := FAcroExch_AVDoc.PrintPagesSilent(nFirstPage,nLastPage,nPSLevel,bBinaryOk,bShrinkToFit); end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.PrintPagesSilentEx(nFirstPage, nLastPage,nPSLevel, bBinaryOk, bShrinkToFit, bReverse, bFarEastFontOpt, bEmitHalftones, iPageOption: Integer): Integer; begin Result := FAcroExch_AVDoc.PrintPagesSilentEx(nFirstPage,nLastPage,nPSLevel,bBinaryOk,bShrinkToFit,bReverse,bFarEastFontOpt,bEmitHalftones,iPageOption); end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.SetFrame(const rect: IDispatch): Integer; begin Result := FAcroExch_AVDoc.SetFrame(rect); end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.SetTextSelection(const iAcroPDTextSelect: IDispatch): Integer; begin Result := FAcroExch_AVDoc.SetTextSelection(iAcroPDTextSelect); end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.SetTitle(const szTitle: WideString): Integer; begin Result := FAcroExch_AVDoc.SetTitle(szTitle); end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.SetViewMode(nType: Integer): Integer; begin Result := FAcroExch_AVDoc.SetViewMode(nType); end; //Unit Description UnitIndex Master Index
function TAcroExch_AVDoc.ShowTextSelect: Integer; begin Result := FAcroExch_AVDoc.ShowTextSelect; end; end. //