// Print same as above, but not maximized ImageEnView1.IO.PrintPreviewParams.MaxiDlgMaximized := False; ImageEnView1.IO.DoPrintPreviewDialog( iedtMaxi );
// If an area of the image is selected, print the selection, otherwise print the whole image procedure TForm1.PrintImageClick(Sender: TObject); var bmp: TIEBitmap; IO: TImageEnIO; begin if ImageEnView1.Selected = False then ImageEnView1.IO.DoPrintPreviewDialog( iedtDialog, '' ) else begin bmp := TIEBitmap.Create; IO := TImageEnIO.CreateFromBitmap( bmp ); try ImageEnView1.CopySelectionToBitmap( bmp ); IO.DoPrintPreviewDialog( iedtDialog, '' ); finally IO.Free; bmp.Free; end; end; end;
Compatibility Information
Prior to v8.0.0, if the user specified a width and height in the Preview dialog, it would not adjust the output to ensure the image aspect ratio was maintained (i.e. image may print stretched). With 8.0.0, the aspect ratio is maintained by default. To restore the older functionality, set ImageEnView1.IO.PrintingMaintainAR := False;