THotPDF.InitialZoom Property

 

THotPDF.InitialZoom

THotPDF

 

Arriba  Anterior  Siguiente

Controla el zoom inicial de visualización de página escrito en la entrada OpenAction del documento. El valor lo respetan los lectores PDF cuando se abre el archivo

 

type

THPDFInitialZoom = (

     FitNone, FitPage, FitWidth, FitHeight, FitBox,

     FitBoxWidth, FitBoxHeight,

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

 

Sintaxis Delphi:

property InitialZoom: THPDFInitialZoom;

 

Sintaxis C++:

__property THPDFInitialZoom InitialZoom;

 

Descripción

Usa InitialZoom para establecer el modo de visualización de página con el que se abre el documento. HotPDF escribe el valor en la entrada /OpenAction del documento como uno de los destinos de vista PDF estándar definidos en la especificación PDF (Fit, FitH, FitV, FitR, FitB, FitBH, FitBV o XYZ)

Desde HotPDF v2.3.11 el valor predeterminado es FitHeight (destino PDF /FitV), así que los documentos generados se abren con cada página ajustada a la altura de la ventana del visor. Configura InitialZoom en FitNone para omitir la entrada OpenAction y dejar que el visor use su propio zoom predeterminado

 

Value              PDF destination    Meaning


FitNone           (none)            Sin zoom especial; deja que el visor use su valor predeterminado

FitPage           /Fit              Fit the entire page inside the window.

FitWidth          /FitH             Fit page width to the window.

FitHeight         /FitV             Ajusta la altura de la página a la ventana (predeterminado)

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.

 

Para una vista general de cómo InitialZoom interactúa con el diccionario de preferencias del visor PDF, consulta ViewerPreferences Complete Reference

 

Ejemplo de código

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;