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 Correct Size Picture
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

wesleybobato

Brazil
367 Posts

Posted - Nov 25 2012 :  06:31:00  Show Profile  Reply
hello I wonder if the next version of VCL ImageEN tera options impressions equal the print wizard windows because the windows have entertainment options like Full Page impression that adjusts the cropping of the image to make the best impression possible without stretching the image keeping the best fit proportion and size of the image, in short it's a 'zoom' image to the impression she does not stretch, it will be that we will have options like that or can you help me to implement because it already did two questions here in the forum and realized that people have difficulty interpreting my difficulty need your help thank you very much for reading and responding.Desfazer edições


296.74 KB

wesleybobato

Brazil
367 Posts

Posted - Nov 27 2012 :  04:09:39  Show Profile  Reply
Hello I wonder if the choices of prints will be improved in the next version of ImageEN to make the closest possible to the print wizard windows
or is it possible to send photos imageEN for printing wizard windows?
Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - Nov 27 2012 :  08:32:58  Show Profile  Reply
I wonder if it is possible I create an option with this option imageEN equal windows
* Adjust the image frame
if possible I would like this option very much.

Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - Nov 28 2012 :  14:48:36  Show Profile  Reply
someone help me create a very accurate option to adjust the image frame when printing full-page ?
Go to Top of Page

xequte

38616 Posts

Posted - Nov 29 2012 :  00:10:08  Show Profile  Reply
Hi

We will consider this for inclusion in a future release.



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

wesleybobato

Brazil
367 Posts

Posted - Nov 29 2012 :  10:25:26  Show Profile  Reply
thanks for the reply I'll wait for the next version a big hug.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 26 2013 :  12:38:47  Show Profile  Reply
The windows printing wizard can only be used if the images are stored as files. The printing wizard can not accept stream or bitmaps as images.

Given that limitation here is some code:

Show a single file in the printing wizard:


uses
  ComObj;

procedure TForm1.Button1Click(Sender: TObject);
var
  CommDlg: OleVariant;
begin
  CommDlg := CreateOleObject('WIA.CommonDialog');
  CommDlg.ShowPhotoPrintingWizard('d:\Image.jpg');
end;

Show multiple files in the printing wizard:
procedure TForm1.Button1Click(Sender: TObject);
var
  Files: OleVariant;
  CommDlg: OleVariant;
begin
  CommDlg := CreateOleObject('WIA.CommonDialog');
  Files := CreateOleObject('WIA.Vector');
  Files.Add('d:\Image 1.jpg');
  Files.Add('d:\Image 2.jpg');
  CommDlg.ShowPhotoPrintingWizard(Files);
end;

Acknowledgement: TLama from the Czech Republic on StackOverflow.
http://stackoverflow.com/questions/15644539/how-do-i-show-the-windows-photo-printing-wizard

I tested the code with this:
procedure TForm1.Print1Click(Sender: TObject);
var
  i: integer;
  iFilename: string;
  iFiles: OleVariant;
  iCommDlg: OleVariant;
  iImageEnView: TImageEnView;
begin
  iCommDlg := CreateOleObject('WIA.CommonDialog');
  iFiles := CreateOleObject('WIA.Vector');
  for i := 0 to cxPageControl1.PageCount - 1 do
  begin
    iImageEnView := TImageEnView(TImageEnView(cxPageControl1.Pages[i].Controls[0]));
    if Assigned(iImageEnView) then
      iFilename := iImageEnView.IO.Params.FileName;
    iFiles.Add(iFilename);
  end;
  iCommDlg.ShowPhotoPrintingWizard(iFiles);
end;


243.77 KB

William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - Mar 26 2013 :  14:34:45  Show Profile  Reply
Hello William Unfortunately the Print Wizard does not work on windows XP it's an error on this line
COMMDLG := CreateOleObject('WIA.CommonDialog');

Says WIA.CommonDialog Class is a class invalidates you know the correct class for windows XP

Thank you William for everything.

https://www.dropbox.com/s/bowo1wi0lzo96a1/Not%20Work%20in%20Windows%20XP%20SP3.zip
Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 26 2013 :  15:05:26  Show Profile  Reply
Sorry. I have no idea I use Windows 7 and Delphi 2010, but you could post a question about it at http://www.stackoverflow.com.

William Miller
Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - Mar 26 2013 :  15:10:06  Show Profile  Reply
Thank You Willian.
Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - Mar 26 2013 :  15:17:39  Show Profile  Reply
Thanks For Your Tip Willian I added, as his suggestion.

http://stackoverflow.com/questions/15648419/how-do-i-show-the-windows-photo-printing-wizard-on-windows-xp

a Big Hug.
Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - Mar 26 2013 :  16:37:52  Show Profile  Reply
Hello Willian can you help me in my question that I posted on stackoverflow ?

Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 26 2013 :  16:48:25  Show Profile  Reply
Sorry Wesley, I do not think I can help with XP because I do not have XP to test on. Maybe someone else can assist you who is running XP.


William Miller
Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - Mar 27 2013 :  08:04:42  Show Profile  Reply
Thanks for Everything Willian, a big hug.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 27 2013 :  09:35:32  Show Profile  Reply
Rob Kennedy posted an answer at StackOverflow.com that is supposed to work with XP. Did you try to implement his code?


William Miller
Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - Mar 27 2013 :  16:45:55  Show Profile  Reply
Thanks William, I'll test with Quite Easy to see what I can here, a Big Hug.
Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - May 28 2013 :  11:06:55  Show Profile  Reply
Hello Gentlemen I Almost Got Make photo printing on the same page full printing wizard windows can help me finish please. ?

var
Zoom, z1, z: double;
x1, y1, x2, y2: integer;
dpix, dpiy: integer;
PageWidth, PageHeight: integer;
begin
Printer.Orientation := poLandscape;

Zoom := (ImageEnVect2.Width - 5) / (Printer.PageWidth / 100);
z1 := (ImageEnVect2.Height - 5) / (Printer.PageHeight / 100);
if z1 < Zoom then
Zoom := z1;
z := Zoom / 100;
PageWidth := trunc(Printer.PageWidth * z);
PageHeight := trunc(Printer.PageHeight * z);
dpix := trunc(GetDeviceCaps(Printer.Handle, LOGPIXELSX) * z);
dpiy := trunc(GetDeviceCaps(Printer.Handle, LOGPIXELSY) * z);

ImageEnVect1.IO.PreviewPrintImage(ImageEnVect2.Bitmap,
ImageEnVect2.Width,
ImageEnVect2.Height,
Printer,
0,
0,
0,
0,
TIEVerticalPos(1),
TIEHorizontalPos(1),
TIESize(3),
PageWidth / dpix + 1,
PageHeight / dpiy + 1,
1);
ImageEnVect2.Update;
Go to Top of Page

w2m

USA
1990 Posts

Posted - May 28 2013 :  11:33:10  Show Profile  Reply
Wesley,

I do not know if it is possible for you, but I would obtain a pc with at least Windows 7 on it and many of your problems would go away. I have already shown you how to use the windows printing wizard, but it requires Windows 7.

William Miller
Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - May 29 2013 :  05:32:16  Show Profile  Reply
Hello Willian then again thank you for your attention.
but I need to do via code. for printing full page becomes equal to Asistente Windows I Almost Got the Perfect code needs a little adjustment but I can not make this adjustment.

this option iesFITTOPAGESTRETCH she stretches People in Photography in Print full page.

Print Wizard in Windows 7 or XP it adjusts a form that does not stretch people.

Photography in the Horizontal and Vertical are adjusted correctly

obs. I bought a Windows 7 license.
Go to Top of Page

w2m

USA
1990 Posts

Posted - May 29 2013 :  05:59:00  Show Profile  Reply
After you install Windows 7 and have Delphi running on it let me know. I can send you a windows photo wizard demo that operates just like you want it to.

William Miller
Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - May 29 2013 :  10:06:47  Show Profile  Reply
Hello William Send me please I'm already using windows 7 From Last Week, will help me a lot to print via code with ImageEN.

Thanks William for his generosity
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: