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 13, 2007 9:15:32 AM(UTC)
Groups: Registered
Posts: 5
Hi ,
i am working with leadtools document imaging suite 15.0 in vb.net 2.0
is it possible to load thumbnails for all pages inside a pdf using RasterThumbnailBrowser?
if yes, can you please post some sample code.
Thanks in advance
Loki
#2
Posted
:
Tuesday, November 13, 2007 10:58:53 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
This code is already written in the help file under the Leadtools.Winforms.RasterImageListItem.Page Property section. Here is a modified version of that code which provides enhanced resizing quality.
RasterCodecs.Startup()
Dim codecs as RasterCodecs = new RasterCodecs()
Dim info As CodecsImageInfo = codecs.GetInformation("c:\file.pdf", True)
Dim thumbnailRect As Rectangle = New Rectangle(0,0,rasterImageList.ItemImageSize.Width, rasterImageList.ItemImageSize.Height)
thumbnailRect = RasterImageList.GetFixedAspectRatioImageRectangle(info.Width, info.Height, thumbnailRect)
Dim rasterImage As RasterImage = codecs.Load("c:\file.pdf", thumbnailRect.Width, thumbnailRect.Height, info.BitsPerPixel, RasterSizeFlags.Bicubic, CodecsLoadByteOrder.Bgr)
Dim i As Integer=1
Do While i<=info.TotalPages
Dim item As RasterImageListItem = New RasterImageListItem(rasterImage, i, "Page " & i)
rasterImageList.Items.Add(item)
i += 1
Loop
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.