Quantcast
Channel: Adobe Community: Message List - Acrobat SDK
Viewing all articles
Browse latest Browse all 10848

' File does not begin with '%PDF-' on Adobe reader XI

$
0
0

C:\Users\AppData\Local\Temp\tmp34A8.pdf

I got above error while I wrote this code on c# windows application .........

 

img5 = (byte[])resultTable.Rows[0]["image5"];

 

if (img5.Length != 0)

  {

 

       axAcroPDF1.Refresh();

     string spathfile = System.IO.Path.GetTempFileName();

       System.IO.File.Move(spathfile, System.IO.Path.ChangeExtension(spathfile, ".pdf"));

       spathfile = System.IO.Path.ChangeExtension(spathfile, ".pdf");

     System.IO.File.WriteAllBytes(spathfile, img5);

       axAcroPDF1.LoadFile(spathfile);

 

}


Viewing all articles
Browse latest Browse all 10848

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>