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
 DoPrintPreviewDialog problem?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

supersk

99 Posts

Posted - Mar 23 2017 :  04:44:02  Show Profile  Reply
I add some annotations in the image.Then I execute follow:
ImageEnVect1->IO->DoPrintPreviewDialog(iedMaxi, Caption, false, "#25171;#21360;#39044;#35272;");
The result image has no any annotations
But, when I execute:
ImageEnVect1->IO->DoPrintPreviewDialog(iedMaxi, Caption, true, "#25171;#21360;#39044;#35272;");
The result image also has no any annotations, but it should has annotations. Why?

xequte

38615 Posts

Posted - Mar 23 2017 :  04:50:18  Show Profile  Reply
Hi

The PrintAnnotations parameter is only for printing of "Wang Imaging Annotations" that are stored in the meta-data.

You should copy the objects to the back before calling the print code:

https://www.imageen.com/help/TImageEnVect.CopyObjectsToBack.html

Either copy your objects to a temporary TImageEnVect, call CopyObjectsToBack, and print, or call CopyObjectsToBack and then after printing call undo.

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

supersk

99 Posts

Posted - Mar 23 2017 :  21:57:49  Show Profile  Reply
The follow is my code:
imgPrint->Assign(ImageEnVect1);
imgPrint->CopyObjectsToBack(true, true);
imgPrint->RemoveAllObjects();
imgPrint->IO->DoPrintPreviewDialog(iedtDialog, Caption, false, "UU");//, Caption, false, "#25171;#21360;#39044;#35272;");
When I run this program, it will show an error:
Floating point division by zero
My enviorment: Delphi XE 10.1 + Win10(64bit), my program is 64bit.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 24 2017 :  14:13:14  Show Profile  Reply
procedure TForm1.Print1Click(Sender: TObject);
begin
  // Save the image with vectorial objects
  ImageEnVect1.Proc.SaveUndo;
  // Merge vectorial objects with the background image
  ImageEnVect1.CopyObjectsToBack(True);
  // Do print preview
  ImageEnVect1.IO.DoPrintPreviewDialog();
  // Restore objects from the merge
  ImageEnVect1.Proc.Undo;
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: