NicePreview

A Delphi component that aimed to be an easy-to-use print preview control
Download

NicePreview Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Publisher Name:
  • Priyatna Harun
  • Operating Systems:
  • Windows All
  • File Size:
  • 327 KB

NicePreview Tags


NicePreview Description

NicePreview is an efficient Delphi component that has the main purpose of being a print preview control. This is a shortcut to add a sophisticated print preview and off course printing feature to your application, bypassing a nitty-gritty screen-printer dpi (dot per inch) issue. All you have to do is dropping the component and write some routines to paint on it like an ordinary screen canvas (96 dpi by default). Yes, it uses screen dpi, not printer's. So you don't have to worry about converting them to different dpi of printer. All in pixel coordinate. NicePreview will not be notified when printer configurations change. So you have to call ReadPrinterConfig method after executing TPrinterSetupDialog or TPrintDialog, and redraw all pages to reflect the changes. Seems complicated, but trust me, it's not difficult. See demo project included. There are some main methods of the component: procedure ReadPrinterConfig; · This method will read current configuration of printer: page height, page width, dot per inch, etc. NicePreview will not be notified when printer configurations change. So you have to call this method after executing TPrinterSetupDialog or TPrintDialog. function BeginPage: TCanvas; · This is will allocate a canvas (TMetafileCanvas) for a new page. You can start drawing on the canvas returned by this function. procedure EndPage; · This method must be called when you finish drawing on the canvas returned by BeginPage. Each BeginPage must be closed by EndPage. procedure Clear; · Clears all pages. procedure SaveToMetafile(FileName: string; Page: Integer); · Save page specified by Page to metafile. procedure PrintPage(Page: Integer); · Prints page specified by Page. procedure PrintAll; · Self explanatory. procedure ViewActualSize; · Zooms to 'Actual Size'. procedure ViewFitToWidth; · Zooms to 'Fit to Width'. procedure ViewWholePage; · Zooms to 'Whole Page'; procedure ViewTwoPage; · Zooms to 'Two Page'. procedure ViewFourPage; · Zooms to 'Four Page'.


NicePreview Related Software