Hi,
We are using your product, and we are having a strange issue with the PDF conversion.
I’m trying to load a pdf and convert it to an image, but I have a problem.
If I load the pdf from a disk path, I have no problem, like this:
RasterImage image = codecsLibrary.codecs.Load(@"C:\PdfFile.pdf", 0, CodecsLoadByteOrder.Rgb, 1, -1);
It loads the total pages ok and the text/Images for each page.
But when I load the pdf from an Uri like this:
RasterImage image = codecsLibrary.codecs.Load(new Uri("http://antbase.org/ants/publications/20994/20994.pdf ", UriKind.Absolute), 0, CodecsLoadByteOrder.Rgb, 1, -1);
It only loads 1 blank/empty page and nothing else.
And if I do this to read the second page:
RasterImage image = codecsLibrary.codecs.Load(new Uri("http://antbase.org/ants/publications/20994/20994.pdf ", UriKind.Absolute), 0, CodecsLoadByteOrder.Rgb, 2, 2);
I have a RasterException: “PDF Error – File is corrupted”
I don’t know why this is happening, like I said, if I load the pdf from a disk path, works fine, but with an Uri I have this problem. I need to mention that we could get other things like Images from Uri without any problems.
Could this be related to the HTTP request?
Could this be related to the codecsLibrary Options that we are missing to add something?
Information of my Environment:
- LeadTools 17
- Visual Studio 2010
- Windows Server 2008R2
- Framework 4.0
Any help would be appreciated.
Thanks,
Sebastian