THotPDF.InitialZoom – vlastnost

 

THotPDF.InitialZoom – vlastnost

THotPDF

 

Nahoru  Předchozí  Další

Řídí počáteční přiblížení zobrazení stránky zapsané do položky OpenAction dokumentu. Hodnotu prohlížeče PDF respektují při otevření souboru

 

type

THPDFInitialZoom = (

     FitNone, FitPage, FitWidth, FitHeight, FitBox,

     FitBoxWidth, FitBoxHeight,

     Zoom50, Zoom75, Zoom100, Zoom125, Zoom150, Zoom200);

 

Syntaxe Delphi:

property InitialZoom: THPDFInitialZoom;

 

Syntaxe C++:

__property THPDFInitialZoom InitialZoom;

 

Popis

Pomocí InitialZoom nastavíte režim zobrazení stránky, se kterým se dokument otevře. HotPDF zapíše hodnotu do položky /OpenAction dokumentu jako jednu ze standardních destinací zobrazení PDF definovaných ve specifikaci PDF (Fit, FitH, FitV, FitR, FitB, FitBH, FitBV nebo XYZ)

Od HotPDF v2.3.11 je výchozí hodnota FitHeight (destinace PDF /FitV), takže vygenerované dokumenty se otevřou s každou stránkou přizpůsobenou výšce okna prohlížeče. Nastavte InitialZoom na FitNone, chcete-li vynechat položku OpenAction a ponechat prohlížeči jeho vlastní výchozí přiblížení

 

Value              PDF destination    Meaning


FitNone           (none)            No special zoom; let the viewer use its own default.

FitPage           /Fit              Fit the entire page inside the window.

FitWidth          /FitH             Fit page width to the window.

FitHeight         /FitV             Fit page height to the window. (default)

FitBox            /FitR or /FitB     Fit the bounding box of the page contents to the window.

FitBoxWidth      /FitBH          Fit the bounding box width to the window.

FitBoxHeight     /FitBV          Fit the bounding box height to the window.

Zoom50            /XYZ null null 0.5       Open the page at 50% scale.

Zoom75            /XYZ null null 0.75      Open the page at 75% scale.

Zoom100          /XYZ null null 1.0       Open the page at 100% (actual size).

Zoom125          /XYZ null null 1.25      Open the page at 125% scale.

Zoom150          /XYZ null null 1.5       Open the page at 150% scale.

Zoom200          /XYZ null null 2.0       Open the page at 200% scale.

 

Vysokoúrovňový přehled toho, jak InitialZoom spolupracuje se slovníkem viewer preferences PDF, najdete v úplné referenci ViewerPreferences

 

Příklad kódu

HPDF := THotPDF.Create( nil );
try
  HPDF.FileName  := 'c:\Output.pdf';
  HPDF.InitialZoom := FitWidth;       // Open with page width fitted to window
  HPDF.BeginDoc;
  HPDF.CurrentPage.TextOut( 100, 100, 0, 'Hello World!' );
  HPDF.EndDoc;
finally
  HPDF.Free;
end;