ImageEn, unit iexBitmaps

IEStrToPaperSize


Declaration

function IEStrToPaperSize(const sSize: string; aDefault: TIOPDFPaperSize = iepUnknown) : TIOPDFPaperSize;


Description

Converts a paper size name (e.g. as returned by IEPaperSizeToStr) to a TIOPDFPaperSize value. TIOPDFPaperSize values are used by PS_PaperSize and PDF_PaperSize.


Example

procedure TMainForm.FormCreate(Sender: TObject);
var
  a: TIOPDFPaperSize;
begin
  // Fill combobox with available PDF paper sizes
  cmbPaperSize.Clear;
  for a := Low(TIOPDFPaperSize) to iepAuto do
    cmbPaperSize.Items.Add(IEPaperSizeToStr(a));

  // Make "US Letter" the selected one
  cmbPaperSize.ItemIndex := cmbPaperSize.Items.IndexOf(IEPaperSizeToStr(iepLetter));
end;

// Set PDF paper size to user's selection
ImageEnView1.IO.Params.PDF_PaperSize := IEStrToPaperSize(cmbPaperSize.Text);


See Also

- IEPaperSizeToStr
- IEPointsToPaperSize
- IEPaperSizeToPoints
- IECalcPaperSize