Author |
Topic |
|
wesleybobato
Brazil
367 Posts |
Posted - Nov 25 2012 : 06:31:00
|
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
|
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? |
|
|
wesleybobato
Brazil
367 Posts |
Posted - Nov 27 2012 : 08:32:58
|
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.
|
|
|
wesleybobato
Brazil
367 Posts |
Posted - Nov 28 2012 : 14:48:36
|
someone help me create a very accurate option to adjust the image frame when printing full-page ? |
|
|
xequte
38616 Posts |
|
wesleybobato
Brazil
367 Posts |
Posted - Nov 29 2012 : 10:25:26
|
thanks for the reply I'll wait for the next version a big hug. |
|
|
w2m
USA
1990 Posts |
Posted - Mar 26 2013 : 12:38:47
|
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 |
|
|
wesleybobato
Brazil
367 Posts |
|
w2m
USA
1990 Posts |
Posted - Mar 26 2013 : 15:05:26
|
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 |
|
|
wesleybobato
Brazil
367 Posts |
Posted - Mar 26 2013 : 15:10:06
|
Thank You Willian. |
|
|
wesleybobato
Brazil
367 Posts |
|
wesleybobato
Brazil
367 Posts |
Posted - Mar 26 2013 : 16:37:52
|
Hello Willian can you help me in my question that I posted on stackoverflow ?
|
|
|
w2m
USA
1990 Posts |
Posted - Mar 26 2013 : 16:48:25
|
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 |
|
|
wesleybobato
Brazil
367 Posts |
Posted - Mar 27 2013 : 08:04:42
|
Thanks for Everything Willian, a big hug. |
|
|
w2m
USA
1990 Posts |
Posted - Mar 27 2013 : 09:35:32
|
Rob Kennedy posted an answer at StackOverflow.com that is supposed to work with XP. Did you try to implement his code?
William Miller |
|
|
wesleybobato
Brazil
367 Posts |
Posted - Mar 27 2013 : 16:45:55
|
Thanks William, I'll test with Quite Easy to see what I can here, a Big Hug. |
|
|
wesleybobato
Brazil
367 Posts |
Posted - May 28 2013 : 11:06:55
|
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; |
|
|
w2m
USA
1990 Posts |
Posted - May 28 2013 : 11:33:10
|
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 |
|
|
wesleybobato
Brazil
367 Posts |
Posted - May 29 2013 : 05:32:16
|
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. |
|
|
w2m
USA
1990 Posts |
Posted - May 29 2013 : 05:59:00
|
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 |
|
|
wesleybobato
Brazil
367 Posts |
Posted - May 29 2013 : 10:06:47
|
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 |
|
|
|
Topic |
|