5
Answers

How to read contents of a pdf file in MVC4

Hi,
I am working on MVC4 aspx view engine.
Here I am having a requirement where I have to read the contents of the uploaded pdf file and need to to show those in view page controls.
For e.g If I read No of items from the pdf file then I have to show the count of items in a textbox.
Please help me to overcome.
 
 
 
Thanks
Mahesh.
 

Answers (5)

0
Photo of dominic scanlan
NA 2 0 15y

Process
p = Process.GetCurrentProcess();
int i = p.Id;
0
Photo of Lalit M
NA 6.7k 48k 15y
use this code sample to get PID

using System.Diagnostics;
private void GetProcessStatus()
{
try
{
//If you know the name of the process
Process[] myProcesses = Process.GetProcessesByName("mspaint");
//If you know the PID of the process use the commented line below
//Process[] myProcesses = Process.GetProcessById("2341");
//Check to see if the process array length is greater than 0
if(myProcesses.Length > 0)
{
MessageBox.Show("The Process Microsoft Paint(mspaint) is currently running.", "Process Status", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("The Process Microsoft Paint(mspaint) is currently NOT running.", "Process Status", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch(Exception ex)
{
MessageBox.Show("An Exception Occoured: " + ex.Message, "Process Status", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}


check also