|
There is nothing built into .NET to create PDFs. You can use the DrawToBitmap method of a control to create a bitmap, then you need a third party library to create a PDF from it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I know that. That's why I atfirst created a bitmap of my form. Now I need ur help to know how to export this bitmap to a pdf file. Please give me link of any sample project or tools for doing this
Faysal
|
|
|
|
|
Google is broken where you live ? You can't find a PDF library on your own ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
google is not broken here....thanks. But u seem to be harsh..behave yourself.
|
|
|
|
|
Hello,
I am using a Java Web Service deployed on JBoss Server.
The WSDL generated from the JBoss Server is being used in the Visual C# 2005 Express Edition for creation of a Third party client or SOAP API Client.
The Reference.cs is generated correctly and I am able to access the methods of the Web Service on JBoss.
The only problem is that the parameters are shown as
<code>public void sharePerspectiveOnDisplay(sessionId arg0, objectId arg1, objectId arg2, int arg3, int arg4, int arg5, int arg6)
{
}</code>
In the above example the only thing understandable is the SessionId for the user and all other parameters are not known to him.
Is there a way thru which I can provide type-mapping for the paramaters.
The same method in the Java Interface/Web Service is as follows:
<code>public void sharePerspectiveOnDisplay (SessionId aSessionId, ObjectId aDisplayId, ObjectId aPerspectiveId, int x, int y, int width, int height)
{
}</code>
So from this perspective, the user of the Web Service do not know as what "ObjectID" he has to pass where and what "int" value to be passed as per x, y, height, width.
Is it possible to achieve this?
Any suggestions will be appreciated.
Thanks,
Kapil
|
|
|
|
|
Hello all,
I need to list all the openned excel and word documents along with the path of the document. I am able to list the applications using EnumWindowsProc and Process.ProcessName. But i don't know how to find the path of the document. Can anyone help me?
Thanx in advance.
JRK
|
|
|
|
|
Member 514252 wrote: I am able to list the applications using EnumWindowsProc and Process.ProcessName. But i don't know how to find the path of the document. Can anyone help me?
Using the Windows API, there's no way to find out what the path of the file is. You'd have to use the Excel object model (Google for "Excel Object Model") to get the workbook names and paths.
|
|
|
|
|
Dear All
While Googling I have noticed the class, it has few static functions and the parameter of this function is class itself.
For more clarification
<br />
public class Myclass<br />
{<br />
<br />
private Membervariables;<br />
<br />
public property;<br />
<br />
Public static retuntype FunctionName(Myclass m )<br />
<br />
{<br />
<br />
m.Membervariables<br />
}<br />
<br />
}<br />
Why it is done and what is the benefit of doing this
Thanks
|
|
|
|
|
looks like sample code with placeholder
|
|
|
|
|
I don't see any good reason for a static method to take a class instance, instead of using an instance method, unless an operator is defined that way.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all,
Please any one suggest me how to solve this issue
System.IO.IOException: The process cannot access the file 'D:\images\2113797.jpg' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileInfo.Delete()
It seems that the file is locked, but it's strict I have to delete the file even though it's being used by another process.
Thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
Exelioindia wrote: It seems that the file is locked, but it's strict I have to delete the file even though it's being used by another process.
Then you are totally screwed.
Instead of asking how to do the impossible, perhaps you need to work out what's locking the file, and fix it ? Opening the file as a Bitmap or Image in your code, can leave it locked until you call Dispose on that Bitmap or Image. If you need to delete the file and keep the image in memory, make a copy and Dispose of the original.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You can use Process Explorer from SysInternals[^]) to figure out what process is locking the file. Open it up, Click Find then "Find handle or Dll..." Enter the filename, and click search.
This will help you identify which program is holding the file open.
If it's your app holding the file open, like Christian says, you need to make sure you close any Bitmap objects, or streams you have as they hold locks on the file.
If it's not your app holding the file open, then there's not much you can do. Look at why the file is held open. Consider telling the user that you were unable to delete the file because another application has it open, and give the user a chance to close the application and then retry the delete.
|
|
|
|
|
Hi,
Thanks for your replay. This is a web application. Also i am not using any Bitmap objects, or streams to process the image. I am just deleting a image which was created by the user.
Also this error occurs for me in server, also it's not occurring frequently.
Know is Drop, Unknown is Ocean
|
|
|
|
|
Well, like I said, use process explorer to find out what process is locking the file. You can run process explorer on the server.
(If the user just created the image through your application, It's likely your not properly closing the file after creating it)
Simon
|
|
|
|
|
OK, then your app can't work at all. Because, if the file is created by the user, then it must be on the local file system, which your web app cannot access, it only works because you're testing it on the machine that is also the server. It also means you're in the wrong forum, we have an ASP.NET forum.
If you mean the user uploaded the image to the server, then it's your code that creates the file, and is at fault for keeping it locked.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Understand what you are doing before you try this. This code forcefully closes the handle to the file. If another app has held the file open, it has probably done so for a reason, forcefully closing it has a strong chance of causing problems/errors in the app. If it's your app that holds the lock on the file, forcefully closing the handle will be likely leave you with invalid/null objects. You should just close the file properly.
[EDIT]
I haven't tried it, and I'm no ASP.NET expert, but I suspect you'll have problems getting this code to run anyway, because you won't have the permissions to use P/Invoke in the server environment.
[/EDIT]
Simon
|
|
|
|
|
I understand it and I'm not encouraging him to do so. I just gave him an example. He decides whether he wants to use it or not.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Sorry, I didn't mean for you to understand it. I've read a few of your articles, I've no doubt at all that you know what your doing I just meant for Exelioindia to be careful with using that. Probably should have made that clearer.
Simon
|
|
|
|
|
It's ok
Simon Stevens wrote: I've read a few of your articles,
Hope you liked them
Giorgi Dalakishvili
#region signature
my articles
#endregion
modified on Tuesday, April 8, 2008 5:39 AM
|
|
|
|
|
Hello
I face a problem with datagridview when want to retrive the particular row index.
In my application I select more then one row by presssing control key. After that when I want to retrive the row index from selected rows then it return wrong row index.
So plz help me regarding this.
Debasmita
|
|
|
|
|
Could please be more descriptive.
Anyways this works fine for me:
int i = this.dataGridView1.SelectedRows[1].Index
Until you realize this message has nothing to say, its too late to stop reading
|
|
|
|
|
checking how many rows are selected in the grid.
First column is check box column.
this code will help to learn something
int count =0;
foreach (DataGridViewRow row in dgrdviewBranch.Rows)
{
bool selectrow = Convert.ToBoolean(row.Cells[0].Value);
if (selectrow == true)
{
count += 1;
}
}
|
|
|
|
|
The command line prompt for running winzip. The below command zips "1.txt" file into "zippy.zip"
C:\Program Files\WinZip>winzip32.exe -min -a D:zippy.zip D:\\1.txt
I want to do this programatically using C# using Process.Start(). I have trouble specifing the parameters for winzip exe. If i give only the exe name as below winzip application opens
System.Diagnostics.Process.Start("C:\\Program Files\\WinZip\\winzip32.exe");
When i try giving the parameters(file name etc) as below it gives an error at run time "The system cannot find the file specified"
System.Diagnostics.Process.Start("C:\\Program Files\\WinZip\\winzip32.exe -min -a D:zippy.zip D:\\1.txt");
I'm not sure if there is any problem with double quotes "". How can i specifiy the paramters? Please help
|
|
|
|