|
How do word covert pdf
How do word covert pdf
|
|
|
|
|
hmm are you interested in writing converter Word (RTF) to PDF files? Or you just want tool to do that?
In latter case type "word to pdf" into google. Btw I use PDF Creator[^]. For documentation of school projects it's fine.
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Hi,
I have a numer in a string that may or may not have a decimal delimiter and some numbers afterwards, e.g. 1234 or 1234,5 or 1234,567. Now I want to show this number to the user with thousand separators, and keep the decimal precision from the original number. I.e. the number should be 1.234 and 1.234,5 and 1.234,567
If I use the following code
NumberFormatInfo nfi = new NumberFormatInfo();<br />
nfi.NumberDecimalSeparator = ",";<br />
nfi.NumberGroupSeparator = ".";<br />
double.Parse(m_value).ToString("N",nfi);
I'll get 1.234,00 and 1.234,50 and 1.234,57 - which is not what I want. Is there any other way to just add the thousand seperators and leave the decimal things unchanged ? It seems that nfi.NumberDecimalDigits misses a "dont mess with it" number...
Any ideas ?
/Jan
Do you know why it's important to make fast decisions? Because you give yourself more time to correct your mistakes, when you find out that you made the wrong one. Chris Meech on deciding whether to go to his daughters graduation or a Neil Young concert
|
|
|
|
|
If I understand you question, then I think you've got your nfi.NumberDecimalSeperator and your ndi.NumberGroupSeperator contents backwards. Try switching the two assignments around and see if that helps.
|
|
|
|
|
You could use something like that ...
string m_value = "12347890123456789,57";
string strhi = m_value;
string strlow = "";
int DecLocation = m_value.IndexOf(",");
int StrLen = m_value.Length;
if ( DecLocation >=0 )
{
strhi = m_value.Remove(DecLocation,StrLen-DecLocation);
strlow = m_value.Substring(DecLocation+1,StrLen-DecLocation-1);
m_value = Separ(strhi)+","+strlow;
}
else
m_value = Separ(m_value);
private string Separ(string str)
{
int i = str.Length/3;
int maxlen = str.Length;
if ( i*3 == maxlen)
i--;
string newstr = str;
for(int j=1;j<=i;j++)
newstr=newstr.Insert(maxlen-j*3,".");
return newstr;
}
|
|
|
|
|
A variable is used in multiple threads. In a particular place, I am modifying the content of variable. So I am doing syncronization. in another place, just I am reading the data. Should I synchronize in the second place?
|
|
|
|
|
Just make a lock statment to the variable while any thread is using it till it finishes.
If I unserstood right?
|
|
|
|
|
Yes, you should. Locking the write operation only prevents multiple threads from writing to the same variable at once. If you don't protect your read operations, there is a chance that you might read in some inconsistent state when another thread is writing to the variable.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hello
I'm using System.Windows.Forms.Label and I want to add some text, where one or more words are bold or italic.
I tried it with html tags but does not work. Somewhere i did read it should be done by html tags. I did it like this:
label1.Text="my <b>test</b> string";
In the output i can see the html tags.<
I hope someone can tell me how to do this.
Thanks
Roggey
|
|
|
|
|
Not supported by the label control. You'll either have to use multiple label controls for each word that is different (a messy solution), or come up with your own variant that supports it. The RichTextBox does support different fonts in the text stream, but is a rather heavyweight control to use as a label.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You can do just what you want in your paint method but you'll need to get a little more involved that you might want to. Basically what you need to do is paint the text of your control yourself. You'll notice that DrawString has a parameter for the font. Just use that and draw the string in sections, one for each font you are using. This also means that you'll need to use MeasureString for each piece as you draw it so you can get the next section to align to the proper place following the preceeding piece.
Hope that makes sense.
|
|
|
|
|
HI,
I have a C# test application developed in Visual Studio .NET 2003. But I want to run it in Visual Studio .NET 2005. But I counldn't run it. It shows that .NET framework 1.1 requires for it to run. I tried to solve problem by registry. But it failed. Can anyone have an idea? Please let me know.
Regards,
Rathish P S
|
|
|
|
|
What do you mean "run it in Visual Studio 2005"? Do you mean run it under .NET 2.0?
The only thing I can think of, is if the application has a .config file specifying the version it needs to run on.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Horrific Minnesota Radio
Judah Himango
|
|
|
|
|
HI,
I have a set up Application in C#.Net 7.1. It is an AddIn to IDE. When I tried to run this application in c# 8.0, an error "Class Not registered" is thrown. Can anyone tell me the reason?
Regards,
Rathish P S
|
|
|
|
|
Hi,
How do I check if a c# program got permission to a network folder or file. Is there anyway I can change the permission if the program dont have the access rights to it?
|
|
|
|
|
Hi all.
I want to generate a hashcode from string and encrypt it with the private key of a .sn file (strong name key pair).
The purpose is to hash the contents of a configuration file, encrypt it, and add the encrypted hash to the file.
At runtime, I want to decrypt the hash with the public key of the assembly, and determine whether the hash is the same of the current hash of the contents.
I have no idea how to do that in practical, can you give some guidelines for that?
Any references would be welcome.
Thanks a lot,
Yaakov
|
|
|
|
|
hmm.... I will look in to it man !
|
|
|
|
|
|
Hi, i used this code i hope it helps u and u understand it
RSACryptoServiceProvider RSA;<br />
RSA = new RSACryptoServiceProvider();<br />
byte[] rawData, hash;<br />
HashAlgorithm HashMan;<br />
HashMan = new SHA1CryptoServiceProvider();<br />
rawData= System.Text.Encoding.Unicode.GetBytes(string PASSWORD); hash = HashMan.ComputeHash(rawData);
RSAPKCS1SignatureFormatter sf = new RSAPKCS1SignatureFormatter(RSA);
sf.SetHashAlgorithm("SHA1");<br />
byte []FinalSignature= sf.CreateSignature(hash);
<br />
RSA.ExportParameters(false);
RSA.ToXMLString(false);
ull send to the receiver the FinalSignature and the RSAParameters or the string with the public key.
in the receiver
<br />
RSAPKCS1SignatureDeformatter sd=new RSAPKCS1SignatureDeformatter(parameters);<br />
RSAPKCS1SignatureDeformatter sd=new RSAPKCS1SignatureDeformatter();<br />
sd.FromXMLString(string xmlParameters);<br />
sd.SetHashAlgorithm("SHA1");<br />
bool pd=sd.VerifySignature(hashinurdatabase,FinalSignature);<br />
<br />
i hope it helps u with the code if u dont uderstand something or want to ask something just say here or emailme.
U will need to give to the SignatureDefformater the parameters of the RSACryptoServerProvider u used in the SignatuerDefformater or it will return u false.
|
|
|
|
|
Thanks for the detailed answer.
If I get it right, I can replace the following code:
HashAlgorithm HashMan;<br />
HashMan = new SHA1CryptoServiceProvider();<br />
rawData= System.Text.Encoding.Unicode.GetBytes(string PASSWORD); <br />
hash = HashMan.ComputeHash(rawData);<br />
RSAPKCS1SignatureFormatter sf = new RSAPKCS1SignatureFormatter(RSA);<br />
sf.SetHashAlgorithm("SHA1");<br />
byte[] FinalSignature= sf.CreateSignature(hash);
with this one:
rawData = System.Text.Encoding.Unicode.GetBytes(string PASSWORD); <br />
byte[] FinalSignature = RSA.SignData(rawData, "SHA1");
Is that correct?
Yaakov
|
|
|
|
|
i am not sure, i think i tried that way but it didnt work for me, i needed to sign the data from the hash with the signature formatter cause it will encode it too.
Try if u can do it that way, but i think the sign data didnt do the same as the signatureformatter
|
|
|
|
|
Hi,
I would like to find out how to use paging in my datagrid?
I have created the datagrid that pulls data from SQL 2000. I am displaying all the records. What I want to do is display 10 records at a time.
I have used paging but when I run the app and click next the same 10 records is displayed.
Can someone please tell me how to page trhough the data?
Thanks!
Illegal Operation
WannaBe and GonnaBe Systems Developer
|
|
|
|
|
an event should be fired when clicking next page. Implement an eventhandler for the event, you can there alter the page of your datagrid. More info on MSDN.
Good luck.
No hurries, no worries.
|
|
|
|
|
I have created an event.
private void DataGrid1_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
DataGrid1.CurrentPageIndex = e.NewPageIndex;
DataGrid1.DataBind();
}
but when running the site, the event does not execute???
Illegal Operation
WannaBe and GonnaBe Systems Developer
|
|
|
|
|
you 're using ASP.NET? not winforms?
In that case you should look into the lifecycle of the page. Try to bind the eventhandler sooner then the Load event (init eg.)
The lifecycle of asp.net pages is, in my opinion, not so easy to understand, but it is quite important.
good luck!
No hurries, no worries.
|
|
|
|