Author |
Topic  |
|
Fábio Nascimento
 
Brazil
72 Posts |
Posted - May 18 2016 : 10:16:30
|
Hi, I started playing with ImageEn and the first impressions are very good.
My goals with ImageEn are:
1) Scan documents and save them as multipage tiffs;
- Haven't tried yet, I'm playing with documents that already exists (multipage tiffs);
2) Open these documents and show them, both thumbnails and the selected page:
ImageEnMView.Clear;
ImageEnMView.MIO.LoadFromFileTIFF(file);
ImageEnMView.SelectedImage := 0;
ImageEnVect.IO.LoadFromFileTIFF(file);
act_best_fit.Execute
Is this the best way to open them? Opening files with few pages are fast, but the ones with 100+ pages are slow to open;
3) Add/remove/move/rotate/etc the pages
- Haven't tried yet
4) This is the most important thing I need to do: I need to "attach" annotations to these tiffs, most of them on the last page, and print.
It's like a stamp, if you imagine a real paper on your hands, I need to stamp the last page.
This stamp will come from a BMP that I create dinamically and it changes all the time.
I have no idea on how to do this: stamp/attach/annotate the BMP to the tiff and print all the pages of this tiff with the stamp/attach/annotate.
I found a way to print with this:
ImageEnVect.IO.DoPrintPreviewDialog(iedtMaxi, 'Imprimir', True,
'Visualizar Impressão');
But it only prints the page that is currently shown, I need to print the entire document, sometimes it has more than 1000 pages.
5) I'd like to use the mouse scroll to scroll the document up/down instead of zoom in ou out of it.
Can someone give some hints please??
Thanks a lot! |
|
w2m
   
USA
1990 Posts |
Posted - May 18 2016 : 13:37:53
|
Why are you asking questions for things I have explicitly shown you how to do... namely Scan and Save multipage tiff, open documents and show thumbnails of the pages.
Have you studied the code I posted for you?
I have shown you how to annotate pages with an ellipse object. For your purposes you need to use a miPutBitmap as the mouseinteract and then copy your bitmap to the bitmap object. Two show all the pages in the multipage tif use the ImageEnMView.MIO.DoPrintPreviewDialog to show all the tif file frames.
If you have not downloaded the demo projects I'd recommend that you download them and study the annotation demos. The vectorial demo shows how to work with the various object types.
You need to spend more than one day before asking the same questions over and over.
ImageEn will handle everything you want to do... just spend a little time studying and learning how to do it.
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |
 |
|
Fábio Nascimento
 
Brazil
72 Posts |
Posted - May 18 2016 : 14:27:20
|
Sorry w2m, I didnt mean to be rude asking again.
Yeah I downloaded your demo, but as I said, it is slow to open tiffs with many pages, and I see you use LoadFromFile, and in other demo I found LoadFromFileOnDemand (which doesnt exists and I can't even compile), and there's a LoadFromFileTIFF, and so many other options, I'm looking for the best way to do that, not just make it work.
I found how to print all the pages of a tiff in the FAQ section.
Yeah, I found out how to put a ellipse object, and yeah I found this miPutBitmap option, but I could not find where to setup the bitmap I want.
I'm speding all the time I have studying, but I tought it was Ok to ask for some north on where to go on, where to begin with and some answers about the difference on some methods that do the same thing, like LoadFromFile<many_options>
I didnt mean to bother you or the devs.
Fábio |
 |
|
Fábio Nascimento
 
Brazil
72 Posts |
Posted - May 18 2016 : 14:32:03
|
I found the
ImageEnMView.LoadFromFileOnDemand(file);
It solved the slow problem on multipage tiffs with many pages. |
 |
|
Fábio Nascimento
 
Brazil
72 Posts |
Posted - May 18 2016 : 15:23:59
|
Now using
ImageEnVect.MouseInteractVt := [miPutBitmap];
ImageEnVect.SetObjBitmapFromFile(IEV_NEXT_INSERTED_OBJECT, 'J:\sei3\ged\temp\carimbo24599.bmp' );
ImageEnVect.ObjKind[IEV_NEXT_INSERTED_OBJECT] := iekBitmap;
ImageEnVect.AddNewObject;
I was able to add the bitmap.
But the bitmap is shown on all pages, and it's not printed.
I use a ImageEnMView to show the thumbnails of all pages, and a ImageEnVect to show the current page.
I need to make this BMP object to be only on the selected page, and I need this BMP object to be printed as an annotation when I print the file.
I'll say sorry again to be posting, but as I said before it looks like the ImageEn main use for the most users is not the same I'll be using for, and even it's possible to do what I need, I can't samples on how to do.
Fábio |
 |
|
xequte
    
38984 Posts |
Posted - May 18 2016 : 17:22:55
|
Hi Fabio
> 3) Add/remove/move/rotate/etc the pages
See the Page Editing methods of TIEMultiBitmap or TImageEnMView:
http://www.imageen.com/help/TIEMultiBitmap.html
> 4) This is the most important thing I need to do: I need to "attach" annotations to these tiffs, most of them on the last page, and print.
I have not seen the code you are using, but either use a TImageEnVect, load the page, add an image object, then call CopyObjectsToBack, and Print:
http://www.imageen.com/help/TImageEnVect.CopyObjectsToBack.html
If you do not use CopyObjectsToBack to only Layer 0 is printed (base image without objects)
Alternatively you could just draw your custom bitmap directly to the canvas of the last page of the TIFF and print it
Or you could add your custom bitmap as a layer, call LayersMergeAll, and then print
(Again LayersMergeAll is needed or only Layer 0 is printed
> But it only prints the page that is currently shown, I need to print the entire document, sometimes it has more than 1000 pages.
If you pass IEM_ALL_IMAGES as the index to PrintImage then all images are printed:
http://www.imageen.com/help/TImageEnMIO.PrintImage.html
> 5) I'd like to use the mouse scroll to scroll the document up/down instead of zoom in ou out of it.
Please see the properties of MouseWheelParams:
http://www.imageen.com/help/TImageEnView.MouseWheelParams.html
Nigel Xequte Software www.xequte.com nigel@xequte.com |
 |
|
Fábio Nascimento
 
Brazil
72 Posts |
Posted - May 18 2016 : 19:08:27
|
Thank you Nigel, I'll look into it tomorrow!
Oh, the code I'm using to add the bitmap is the follow:
ImageEnVect.MouseInteractVt := [miPutBitmap];
ImageEnVect.SetObjBitmapFromFile(IEV_NEXT_INSERTED_OBJECT, 'J:\sei3\ged\temp\carimbo24599.bmp' );
ImageEnVect.ObjKind[IEV_NEXT_INSERTED_OBJECT] := iekBitmap;
ImageEnVect.AddNewObject; |
 |
|
xequte
    
38984 Posts |
Posted - May 19 2016 : 00:53:33
|
Hi Fabio
Yes, so the TImageEnVect route. Just ensure you call CopyObjectsToBack() before printing.
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
 |
|
Fábio Nascimento
 
Brazil
72 Posts |
Posted - May 19 2016 : 07:03:23
|
Hi,
I'm having some difficult here.
I use a ImageEnMView to show the thumbnails of all pages of the tiff file.
Then on the ImageEnMViewImageSelect I use this to show the current page on a ImageEnVect:
ImageEnMView.CopyToIEBitmap(idx, ImageEnVect.IEBitmap);
ImageEnVect.Update;
Then I add the bitmap objetct to the ImageEnVect component with:
ImageEnVect.MouseInteractVt := [miPutBitmap];
ImageEnVect.SetObjBitmapFromFile(IEV_NEXT_INSERTED_OBJECT, 'J:\sei3\ged\temp\carimbo24599.bmp' );
ImageEnVect.ObjKind[IEV_NEXT_INSERTED_OBJECT] := iekBitmap;
Now I need to print all the pages of the tiff file, including the one that now has the bitmap object.. I use ImageEnVect.CopyObjectsToBack(True);.
But if I print from the ImageEnVect it prints only the selected page, I believe it is right because this component is only showing this page.
If I print from the ImageEnMView it print's all the pages, but it doesn't print the bitmap object, even when I use ImageEnVect.CopyObjectsToBack(True);. I believe that is right too because the bitmap object is on other component.
So I'm still stucked on how to print the all the pages with the bitmap object, should I load the entire document on a ImageEnVect? How?
Thanks! |
 |
|
w2m
   
USA
1990 Posts |
Posted - May 19 2016 : 09:20:55
|
I have solved your problems when printing multi frame tif images with objects in a new demo I am working on for you. The print preview dialog shows all frames loaded into TImageEnMView. You can now print all the frames or the selected frame. If a frame has a bitmap object it is shown on the frames thumbnail as well as in the dialogs preview. When the frames with objects are printed the objects are printed nicely.
I am using ImageEnMView1.MIO.DoPrintPreviewDialog('Print', True, 'Print Preview', False), rather than ImageEnVect1.IO.DoPrintPreviewDialog which is the major difference between what you are doing and what I am doing in the new demo.
When I finish the demo I'll post it for you.
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |
 |
|
Fábio Nascimento
 
Brazil
72 Posts |
Posted - May 19 2016 : 09:25:32
|
Cool thanks Bill.
But let me ask you, the problem I see is that you have the frames loaded on a TImageEnMView, but the bitmap object is on a TImageEnVect instead.
I think the missing part is to do something that connect the View (where are all frames) with the Vect (where is only the current page).
Unless you are adding the object direct to the View? (is it possible?)
Anyways thank you very much for your help. |
 |
|
w2m
   
USA
1990 Posts |
Posted - May 19 2016 : 09:34:43
|
I am using something new that I have not tried before, and that is the objects are shown in each thumbnail of TImageEnMView. Also for each frame there is a TImageEnVect created on a TPageControl for each frame in the tif file. When you select a thumbnail in TImageEnMView, the page control shows the PageControl's TImageEnVect for the selected frame. When you select a PageControl page, the corresponding Frame in TimageEnView is shown.
The objects are loading into TImageEnMView and then are shown in the corresponding frame in the page control.
Don't worry. It is working very well and it will solve your problems.
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |
 |
|
Fábio Nascimento
 
Brazil
72 Posts |
Posted - May 19 2016 : 10:23:19
|
ok thanks a million again bill! |
 |
|
w2m
   
USA
1990 Posts |
Posted - May 19 2016 : 11:45:09
|
Fabio,
You may download the new Demo - How to use Annotations With TImageEnMView with TImageEnVect here: attach/w2m/2016519193249_Multiframe.zip 2913.88 KB
I tested this for a while, but there maybe some bugs so if you have a problem let me know. I did test creating a new multiframe tiff file, loading multiframe tif files with objects, saving the multiframe tiff file, and printing all frames or the selected frame. I also tested the scanning with my scanner.
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development
|
 |
|
Fábio Nascimento
 
Brazil
72 Posts |
Posted - May 19 2016 : 12:34:59
|
Thank you Bill, i'll take a look now! |
 |
|
|
Topic  |
|