Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Re: Problem Loading a portion of Pdf Page
Started by loki at 05-30-2008 6:45. Topic has 6 replies.

Print Search « Previous Thread Next Thread »
  05-30-2008, 6:45
loki is not online. Last active: 6/2/2008 5:10:08 PM loki

Top 500 Posts
Joined on 11-13-2007
Posts 8
Problem Loading a portion of Pdf Page
Reply Quote
Hi,
I am working with Leadtools document imaging suite 15.0 in vb.net 2.0

My requirement is to load only a specific part of image from memory

I am trying
" Load(String, Rectangle,Int32, CodecsLoadByteOrder, Int32,Int32) "  &
" Load(Stream, Rectangle,Int32, CodecsLoadByteOrder, Int32,Int32) " method.

That code is working fine with jpg as well as bmp
But when I try it with a PDF

It throws "Leadtools.RasterException: PDF Error - File is corrupted"

Here is the code I am trying
'------------------------------------------------CODE
RasterCodecs.Startup()
_codecs = New RasterCodecs()
RasterSupport.Unlock(RasterSupportType.Document, "my unlock code")   
RasterSupport.Unlock(RasterSupportType.PdfRead, "my unlock code")

Dim dlg As New OpenFileDialog()
dlg.Filter = "All Files|*.*"
If (dlg.ShowDialog() = Windows.Forms.DialogResult.OK) Then
imgName = dlg.FileName.Trim
Else
Exit Sub
End If

Dim info As CodecsImageInfo = _codecs.GetInformation(imgName, False, 1)
Dim width As Integer = info.Width \ 3
Dim height As Integer = info.Height \ 3
Dim rc As Rectangle = New Rectangle((info.Width - width) \ 2, (info.Height - height) \ 2, width, height)

Panel1.BackgroundImage=_codecs.Load(imgName, rc, 16, info.Order, 1, 1).ConvertToGdiPlusImage()
RasterCodecs.Shutdown()
'------------------------------------ end code

Please advice

Thanks & Regards
Loki


   Report 
  06-01-2008, 4:36
Qasem Lubani is not online. Last active: 9/2/2008 11:31:52 AM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,044
Re: Problem Loading a portion of Pdf Page
Reply Quote
Loki,

Can you open the file using Adobe? Also, if you try to load the file using one of our main demos, does it load correctly? Are you able to load other PDF files? The loading does not have to be from memory, I just want to make sure that we are able to load the file.

Is it possible to send me the file for me to test here? If you decided to send me the file, please put it in a ZIP or RAR file first.
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  06-02-2008, 3:03
loki is not online. Last active: 6/2/2008 5:10:08 PM loki

Top 500 Posts
Joined on 11-13-2007
Posts 8
Re: Problem Loading a portion of Pdf Page
Reply Quote

Hi Qasem,

Yes, I am able to load the same file successfully with Adobe & Your Demo Programs.

Codecs.Load(imgName, 8, info.Order, 1, 1) method also is loading successfully,

Its only when I use codecs.Load(imgName, rect, 0, info.Order, 1, 1) , I get ""PDF Error - File is corrupted"


About sending file for testing

I tried with files of different sizes and colors,  it always throws the same error, with EVERY file I tried.

Even with the “PDFSegmentation.pdf” which comes with your Demo Programs.

I Hope that info. helps

Regards
Loki.


   Report 
  06-02-2008, 10:00
Qasem Lubani is not online. Last active: 9/2/2008 11:31:52 AM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,044
Re: Problem Loading a portion of Pdf Page
Reply Quote
I have tested the issue here and I noticed a problem in which I want to report to our engineers for further investigation. Can you please send an email to support@leadtools.com form a valid email address so that I can report this under your name. Please mention this forum post in your email to support.
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  06-02-2008, 12:19
loki is not online. Last active: 6/2/2008 5:10:08 PM loki

Top 500 Posts
Joined on 11-13-2007
Posts 8
Re: Problem Loading a portion of Pdf Page
Reply Quote
Qasem,
I have just sent a mail to support@leadtools.com
and got an automated reply with ticket number


Hope this issue will be resolved soon

Regards
Loki.

   Report 
  06-03-2008, 4:49
Qasem Lubani is not online. Last active: 9/2/2008 11:31:52 AM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,044
Re: Problem Loading a portion of Pdf Page
Reply Quote

The issue was reported under incident number 7024AMN. If you would like to ask about the status in the future, please refer to the incident number. I will also notify you as soon as our engineers address the issue.
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  07-28-2008, 4:49
Qasem Lubani is not online. Last active: 9/2/2008 11:31:52 AM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,044
Re: Problem Loading a portion of Pdf Page
Reply Quote
The incident 7024AMN was marked as fixed by our engineers. Please send us your serial number for verification to get the latest patches download instructions?


Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
Post
LEAD Support Fo... » Developer » PDF » Re: Problem Loading a portion of Pdf Page

Powered by Community Server, by Telligent Systems