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 13, 2007 9:15:32 AM(UTC)

loki  
loki

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
 

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)

BoydP  
Guest

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.

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