Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, November 27, 2007 6:10:57 AM(UTC)

w.hanks  
w.hanks

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?
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, November 28, 2007 5:19:18 AM(UTC)
Maen Hasan

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)

w.hanks  
w.hanks

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)
Maen Hasan

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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.112 seconds.