How to read and convert AFP file to PDF with C#?

2.1k Views Asked by At

I'm trying to read a very large .AFP file and then convert it to .PDF but I can not do it, I've reached the point of getting all bytes of the file but how do I convert it to PDF.

         // Open the file.
         FileStream fs = new FileStream (szFileName, FileMode.Open);
         // Create a BinaryReader on the file.
         BinaryReader br = new BinaryReader (fs);
         // array of bytes big enough to hold the file's contents.
         Byte [] bytes = new Byte [fs.Length];
         // Your unmanaged pointer.
         IntPtr pUnmanagedBytes = new IntPtr (0);
         Int nLength;

         NLength = Convert.ToInt32 (fs.Length);
         // Read the contents of the file into the array.
         Bytes = br.ReadBytes (nLength);

Any idea or suggestion I'm working with C #.

0

There are 0 best solutions below