This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, August 10, 2010 1:42:09 AM(UTC)
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)
#2
Posted
:
Tuesday, August 10, 2010 1:46:50 AM(UTC)
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)
Groups: Registered
Posts: 8
sorry,and it's multi-pdf file.
#4
Posted
:
Tuesday, August 10, 2010 3:31:58 AM(UTC)
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)
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.