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, August 10, 2010 1:42:09 AM(UTC)

qujian  
qujian

Groups: Registered
Posts: 8


hello

I'm using LeadTools 16.5 to show the pdf file in the viewer with RasterImageList controller.
like this:
///////////////////////////////////////////////////
Dim info As CodecsImageInfo = _codecs.GetInformation(fileName, True)

_codecs.Options.Load.Format =RasterImageFormat.RasPdfG4

_codecs.Options.Pdf.Load.XResolution = 400

_codecs.Options.Pdf.Load.YResolution = 400

_codecs.Options.Pdf.Save.UseImageResolution = True

rasterImage = _codecs.Load(fileName)

RasterImageViewer.Dock = DockStyle.Fill
RasterImageViewer.InteractiveMode = RasterViewerInteractiveMode.Pan
RasterImageViewer.HorizontalAlignMode = RasterPaintAlignMode.Center
RasterImageViewer.VerticalAlignMode = RasterPaintAlignMode.Center
RasterImageViewer.AutoResetScaleFactor = False
RasterImageViewer.UseDpi = True
Dim i As Integer
For i = 1 To info.TotalPages
Dim listItem As RasterImageListItem = New RasterImageListItem(rasterImage, i, String.Format("Page {0}", i))
Me.RasterImageList.Items.Add(listItem)
Next

///////////////////////////////////////////////////

By these codes,I can show the pdf in the viewer and the thumbnail. But the thumbnail's quality and viewer's quality is not good.Specifically when zoom out.Could you tell me how can I deal with it ?
By the way,the pdf file is from scanning by these codes:
_codecs.Save(e.Image,filename, RasterImageFormat.RasPdfG4, 1, 1, 1, 1, CodecsSavePageMode.Append)
 

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, August 10, 2010 1:46:50 AM(UTC)

qujian  
qujian

Groups: Registered
Posts: 8


And , I have already set the _codecs.Options.Pdf.Load.XResolution = 400
_codecs.Options.Pdf.Load.YResolution = 400

But,It's still poor when zoom out.
 
#3 Posted : Tuesday, August 10, 2010 1:54:46 AM(UTC)

qujian  
qujian

Groups: Registered
Posts: 8


sorry,and it's multi-pdf file.
 
#4 Posted : Tuesday, August 10, 2010 3:31:58 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

If you are trying to load 1-BPP black and white images, you can try using the RasterPaintDisplayModeFlags.ScaleToGray. You can use this by setting the PaintProperties property of the RasterImageList and RasterImageViewer controls. Please note that ScaleToGray requires Document support to be unlocked in order for it to affect the display.
For more information, please see this page:
http://www.leadtools.com/help/leadtools/v15/DH/WI/Leadtools.WinForms~Leadtools.WinForms.RasterImageViewer.html

Also, you can load the PDF file as 1-BPP by setting the codecs.Options.Pdf.Load.DisplayDepth property to 1.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#5 Posted : Tuesday, August 10, 2010 3:22:22 PM(UTC)

qujian  
qujian

Groups: Registered
Posts: 8


I resolved it ! Thank you very much !!
 
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.096 seconds.