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 A4 image in original size
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Golem

5 Posts

Posted - Oct 23 2012 :  00:12:51  Show Profile  Reply
I scanned an A4 document at 200dpi in TIF format. I want to print it in its original size.
I set all print margins to zero. The printed image in "normal" mode is much smaller.
The printed image in "fit" or "stretch" mode is 5% smaller.
I inserted the scanned image in a "Openoffice writer" document and the borderless printing is exactly like the original.
How can I print the image in original size with ImageEn components?

Best Regards

fab

1310 Posts

Posted - Oct 28 2012 :  00:05:56  Show Profile  Reply
Please make sure the image DPI is actually 200. Just for test, try this:

ImageEnView.IO.Params.DPI := 200;
ImageEnView.IO.DoPrintPreviewDialog();
Go to Top of Page

Golem

5 Posts

Posted - Oct 29 2012 :  03:09:27  Show Profile  Reply
I used the ImageEnMView component for scanning multipage document at 200 dpi and after I assign the selected page to ImageEnView component with this code:
ImageEnView1.Assign( ImageEnMView1.Bitmap).

following code:
ImageEnView.IO.Params.DPI := 200;
ImageEnView.IO.DoPrintPreviewDialog();
works because ImageEnView.IO.Params.DPI was at 300

but
ImageEnMView.MIO.Params[0].DPI := 200;
ImageEnMView.MIO.DoPrintPreviewDialog();
doesn't work because ImageEnMView.MIO.Params[0].DPI was alredy at 200.

What is the best way to assign the selected image to ImageEnView control, so as to keep also the dpix, dpiy and IO.params.dpi properties?

How can I solve the problem of printing from the ImageEnMView Control?

Thanks
Go to Top of Page

w2m

USA
1990 Posts

Posted - Oct 29 2012 :  06:48:43  Show Profile  Reply
You can try this:
procedure TForm1.ImageEnMView1ImageSelect(Sender: TObject; idx: Integer);
begin
 ImageEnView1.IEBitmap.Assign(ImageEnMView1.GetTIEBitmap(idx));
 ImageEnMView1.ReleaseBitmap(idx);
 ImageEnView1.IO.Params.Assign(ImageEnMView1.MIO.Params[idx]);
 ImageEnView1.Update;
end;

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

Golem

5 Posts

Posted - Oct 29 2012 :  08:23:10  Show Profile  Reply
Thanks. My problem now is the printing from the ImageEnMView Control.

This code:
ImageEnMView.MIO.Params[0].DPI := 200;
ImageEnMView.MIO.DoPrintPreviewDialog();
doesn't work because ImageEnMView.MIO.Params[0].DPI was alredy at 200.
Go to Top of Page

Golem

5 Posts

Posted - Oct 30 2012 :  08:25:43  Show Profile  Reply
I found the problems in the ieprnform3.pas:

1) in the event "PrintPreview" the "ie.io.Params.DpiX" and "ie.io.Params.DpiY" settings are missing.

2) in the procedure "SetLanguage" the size combobox is not localized and grpMargins.Caption is set with "iemsg(IEMSG_INCHES, l)" only, I use cm.

I sent you the new ieprnform3.pas with this bug fixed.

Fix your code for new release and set the new versions to bpl please.

Best Regards
Go to Top of Page

w2m

USA
1990 Posts

Posted - Oct 30 2012 :  08:56:14  Show Profile  Reply
2) in the procedure "SetLanguage" the size combobox is not localized and grpMargins.Caption is set with "iemsg(IEMSG_INCHES, l)" only, I use cm.

// Set the language
// unit hyiedefs
Type TMsgLanguage=(msSystem, msEnglish, msItalian, msGerman, msSpanish, msFrench, msPortuguese, msGreek, msRussian, msDutch, msSwedish, msPolish, msJapanese, msCzech, msFinnish, msFarsi, msChinese, msChineseTraditional, msDanish, msTurkish, msKorean, msHungarian, msUser);
ImageEnMView.MIO.MsgLanguage := msItalian;

// Change to CM
ImageEnView.MIO.DialogsMeasureUnit := ieduCm;
ImageEnView.MIO.DoPrintPreviewDialog('');
William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page

Golem

5 Posts

Posted - Oct 30 2012 :  09:55:43  Show Profile  Reply
w2m, your solution is valid for ImageEnView controls.
ImageEnMView control use ieprnform3.pas. It has the bugs.
Go to Top of Page

xequte

39061 Posts

Posted - Nov 14 2012 :  21:03:22  Show Profile  Reply
These fixes will be included in the next update.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: