This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, November 27, 2007 6:10:57 AM(UTC)
Groups: Registered
Posts: 5
I had a request to modify my application to display multi-page files as one continous page similar to what Adobe Reader allows. I already found one post in the forum that states that the main control does not have this capability. Is there a Lead image tool that will do this or can the Image List control be set to scroll smoothly between pages rather than jumping up a full page?
#2
Posted
:
Wednesday, November 28, 2007 5:19:18 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
Hello,
If you mean that you want show the Multi-page images as continues view, I am afraid that this feature is not supported by the rasterImageViewer control.
However, I have an idea that might help you to do this:
- Draw a Panel on your form (set the panel AutoScroll property True).
- Load the image that you want to display.
- Create different RasterImageViewer controls with the same number of the pages in the image. And add these RasterImageViewer controls on the panel sequentially.
- Now, in the Paint event of the RasterImageViewer control, paint the page that you want to display on the RasterImageViewer control.
The code is something as follows:
+------------------+
Public Class Form1
Private TempImage As RasterImage
Private _codecs As RasterCodecs
Private page As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x, y, w, h As Integer
RasterCodecs.Startup()
_codecs = New RasterCodecs
Dim i As Integer
x = 9
y = 12
w = 384
h = 251
TempImage = _codecs.Load("c:\Test.TIF")
For i = 1 To TempImage.PageCount
page = i
Dim _ViewerNew As New RasterImageViewer
_ViewerNew.Location = New Point(x, y)
_ViewerNew.Size = New Size(w, h)
AddHandler _ViewerNew.Paint, AddressOf viewer_Paint
Panel1.Controls.Add(_ViewerNew)
y = y + h + 6
Next
End Sub
Private Sub viewer_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs)
TempImage.Page = page
TempImage.Paint(e.Graphics, e.ClipRectangle, RasterImageViewer1.PaintProperties)
End Sub
End Class
+------------------+
Thanks,
Maen Badwan
LEADTOOLS Technical Support
#3
Posted
:
Wednesday, November 28, 2007 11:12:08 AM(UTC)
Groups: Registered
Posts: 5
That would work for smaller documents and I may take some time and try something like that. But some of the tif and pdf documents I have to work with run into the hundreds even thousands of pages. It would take forever to create and load that many controls. Or at least it would seem like forever to my users. I may be able to set something up where I recycle a dozen or so controls, but I was really hoping there was a "smooth scrolling" option or something with the Image List control. My users may just have to live with the limitations.
Thanks for your help.
#4
Posted
:
Wednesday, November 28, 2007 11:22:00 PM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
Hello,
You are right. This workaround is useful only if you have small Multi-page images.
About the RasterImageList control, the RasterImageList control might help you to view the images in continues way, but the problem is in the scrolling style. There is no smooth scrolling option using the RasterImageList control.
Thanks,
Maen Badwan
LEADTOOLS Technical Support
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.