YOUSEFUL / DELPHI / COMPONENTS
TAtlasPdfSize
Width and height of a PDF page as reported by the Windows PDF engine (device-independent pixels at 96 dpi).
Description
Returned by TAtlasPdfDocument.PageSize. The values are Single and come straight from the engine, which reports pages in device-independent pixels at 96 dpi rather than PDF points: multiply points by 96/72 to predict them (300 × 400 points give 400 × 533). Use the ratio to compute the rendered height for a chosen width.
Members
| Member | Kind | What it does |
|---|---|---|
Width | field | Page width in device-independent pixels. |
Height | field | Page height in device-independent pixels. |
Fields
Width field
TAtlasPdfSize = record Width, Height: Single; end;Page width in device-independent pixels.
Height field
TAtlasPdfSize = record Width, Height: Single; end;Page height in device-independent pixels.
Examples
Predict the rendered height
RenderPage keeps the aspect ratio; this computes the height it will produce.
uses Atlas.Pdf;
function RenderedHeight(Document: TAtlasPdfDocument; Page, Width: Integer): Integer;
var
Size: TAtlasPdfSize;
begin
Size := Document.PageSize(Page);
Result := Round(Width * Double(Size.Height) / Size.Width); // 800 for Width = 600 and a 3:4 page
end;Related
TAtlasPdfDocument · TAtlasPdfRect
Also in Atlas VCL
TAtlasTable · TAtlasGrid · TAtlasValueEdit · TAtlasTree · TAtlasWorkbook · TAtlasSheetGrid · TAtlasPivot · TAtlasInspector · TAtlasRichEdit · TAtlasSpellChecker · TAtlasChart · TAtlasGauge · TAtlasThemer · TAtlasWizard · TAtlasWorkspace · TAtlasCommandBar · TAtlasActionTile · TAtlasTileBoard · TAtlasNavigation · TAtlasMap · TAtlasGraph · TAtlasDiagram · TAtlasPrintDocument · TAtlasSchedule · TAtlasScheduler · TAtlasTaskPlan · TAtlasGantt · TAtlasPdfDocument · TAtlasPdfViewer