ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Print from ImageEn without Showing PreviewDialog
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogiyang

India
728 Posts

Posted - Mar 24 2017 :  10:01:47  Show Profile  Reply
Hello,

How to get ImageEn to print its contents without showing Print Preview Dialog.

It should just show the Print Dialog from where a user can select printer and set its properties, etc.

TIA


Yogi Yang

w2m

USA
1990 Posts

Posted - Mar 24 2017 :  14:20:37  Show Profile  Reply

if PrinterSetupDialog1.Execute then
begin
  // Print the image in the center of the page at the original size
  Printer.BeginDoc;
  ImageEnView1.IO.PrintImage(Printer.Canvas, 0, 0, 0, 0, ievpCenter,    
    ievpCenter, iesNormal, 0, 0, 1);
  Printer.EndDoc;

  // Print the image in the center of the page stretched to page dimensions
  (respecting the proportions)
  Printer.BeginDoc;
  ImageEnView1.IO.PrintImage(Printer.Canvas, 0, 0, 0, 0, ievpCenter,  
    iehpCenter, iesFitToPage, 0, 0, 1);
  Printer.EndDoc;

  // Print the image as a poster, four pages wide and six pages high
  Printer.BeginDoc;
  ImageEnView1.IO.PrintImage(Printer.Canvas, 0, 0, 0, 0, ievpCenter, 
    iehpCenter, iesMultiplePages, 4, 6, 1);
  Printer.EndDoc;

  // Print all pages of a TIFF
  Printer.BeginDoc;
  for I := 0 to ImageEnView1.IO.Params.ImageCount - 1 do
  begin
    ImageEnView1.IO.Params.ImageIndex := I;
    ImageEnView1.IO.LoadFromFile('C:\input.tif');
    ImageEnView1.IO.PrintImage(Printer.Canvas);
  end;
  Printer.EndDoc;
end;

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

yogiyang

India
728 Posts

Posted - Mar 25 2017 :  04:42:27  Show Profile  Reply
Hello Bill,

Thanks a load. I was actually hoping for a built in function from IE but anyways...

This did the trick.

TIA


Yogi Yang
Go to Top of Page

xequte

39061 Posts

Posted - Mar 25 2017 :  20:53:40  Show Profile  Reply
Hi Yogi,

Those are built-in functions.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

skippix

USA
68 Posts

Posted - Feb 26 2018 :  12:02:45  Show Profile  Reply
should also note that you may have to add unit imageenio to uses clause.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: