p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Visual Studio 2005 (http://p2p.wrox.com/forumdisplay.php?f=140)
-   -   read pdf files in C# (http://p2p.wrox.com/showthread.php?t=61989)

prasannatele September 12th, 2007 05:46 AM

read pdf files in C#
 
Hi all,
Please reply asap.
The control goes into infinite loop when i try reading pdf file in my C# file.[:0]
I have to return a string as it is my requirement.
can anyone suggest what to do?

FileStream ReadPdf = new FileStream(@"D:\abc.pdf", FileMode.Open);
            long FileSize;
            FileSize = ReadPdf.Length;
            UTF8Encoding temp = new UTF8Encoding(true);
            Int16 i;
            string returnstring = null;

            byte[] Buffer = new byte[(Int64)FileSize];
            ReadPdf.Read(Buffer, 0, (int)ReadPdf.Length);
            for (i = 0; i <= Buffer.Length - 1; i++)
            {
                returnstring = temp.GetString(Buffer);
            }
            return returnstring;



All times are GMT -4. The time now is 07:26 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.