ImageEn, unit iepdf

IECalcPaperSize


Declaration

function IECalcPaperSize(const Width, Height : Double; Metric: Boolean) : TIOPDFPaperSize;


Description

Finds the largest paper type that will fit within the dimensions of Width and Height (specified in inches).
If Metric is true, the result will be one of: iepA0, iepA1, iepA2, iepA3, iepA4, iepA5, iepA6, iepB5. Otherwise it will be a US value from: iepLetter, iepLegal, iepTabloid
Result will be iepUnknown if the method fails.

Note: Supports only Portrait layouts


Example

with ImageEnMView1.MIO do
begin
  lblSizeM  := 'Max Paper Size (Metric): + IEPaperSizeToStr( IECalcPaperSize( AcquireParams.PhysicalWidth, AcquireParams.PhysicalHeight, True ));
  lblSizeUS := 'Max Paper Size (US): + IEPaperSizeToStr( IECalcPaperSize( AcquireParams.PhysicalWidth, AcquireParams.PhysicalHeight, False ));
end;


See Also

 IEPaperSizeToStr
 IEStrToPaperSize
 IEPointsToPaperSize
 IEPaperSizeToPoints