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



Last Go to last post Unread Go to first unread post
#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

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 : 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.

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)
    i += 1
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.069 seconds.