Thursday, July 14, 2016

convert PDF to JPG image in C#.Net

//Pdf to jpg file Convert in C#.Net
 string cmd = "\"" + System.Windows.Forms.Application.StartupPath + "\\gswin64.exe \"";

       
            string argu = " -dNOPAUSE -dBATCH -dSAFER -sDEVICE=jpeg -djpegq=500 -r500  -dNumRenderingThreads=8 -sOutputFile=" + "\"" + System.Windows.Forms.Application.StartupPath + "\\" + FileName+ "%d.jpg" + "\" " + " \"" + PathAndFileName + "\"";
     
         
            System.Diagnostics.Process proc = new System.Diagnostics.Process();
            proc.StartInfo.FileName = cmd;
            proc.StartInfo.Arguments = argu;
            proc.StartInfo.CreateNoWindow = true;
            proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
            proc.Start();
            proc.WaitForExit();

Tuesday, July 12, 2016

JSON Support in SQL Server 2016

--JSON Support  in SQL Server 2016
Example:=

Select top(1) TrnNo,Amount
from Sale
For JSON  PATH, ROOT('TrnNo')

Output:=

{"TrnNo":[{"TrnNo":1,"Amount":100}]}