|
Hello everybody,
By using below codes I produced a pdf file.
static void Main(string[] args)
{
FileStream fstrm=new FileStream("b.pdf", FileMode.OpenOrCreate, FileAccess.ReadWrite);
StreamWriter wrtr = new StreamWriter(fstrm);
string str = "Hello Acrobat";
wrtr.WriteLine(str);
wrtr.Close();
fstrm.Close();
}
However as I open the b.pdf file with Adobe Acrobat 5.0 I see below message.
"Acrobat could not open b.pdf because it is either not a supported file type or because the file has been corrupted."
What should I do to open the file with Acrobat Reader after program?
Thanks a lot.
|
|
|
|
|
Write something in PDF format - it's a very complex file format, so you would be best using a third party PDF library like iText[^].
Ryan
"Michael Moore and Mel Gibson are the same person, except for a few sit-ups. Moore thought his cheesy political blooper reel was going to tell people how to vote. Mel thought that his little gay SM movie about his imaginary friend was going to help him get to heaven."
- Penn Jillette
|
|
|
|
|
Hiii,
I have done this but i m using a tried party API for the same...
except using thried party API i think it's possible coz u can not
read PDF format file...using streams...It's very deficult...
i m using this API
http://www.colorpilot.com
Thanx
Anuj Kamthan
Software Developer
Solversa Technologies,
Pune - 411007, India.
http://www.solversa.com
|
|
|
|
|
Hello
I want to write an image viewer application in C# 2.0 The app can view multiple images, each image is opened in a TabPage. How to control Tab Pages ? Ex: when user switch to other tab, the app must move to that tab. Do I have to use ArrayList to control these TabPage ?
Help me. Thank you very much
|
|
|
|
|
Im writing a windows service in C# and I want to trigger an event within that service using a MS SQl server(2005) Trigger. i.e. The Windows service sits there doing whatever, when a new row is created in a specific table it will somehow message/trigger an event within the service.
Hope this makes sense,. Am I asking in the right place?
Kind Regards,
Rhys
|
|
|
|
|
Hi, I am trying to access a webservice from .NET client that I created. I am connected to the internet thru' the WinSock Proxy Client config. But, I am not able to access the webservice I get the foll. error: The underlying connection was closed: Unable to connect to the remote server.
Thanks & Regards,
Ramadas
|
|
|
|
|
Hi all,
Not a C# or even .net programmer so please bare with me.
Can C# use the Rijendeal/AES block cipher without it beiing imported
from an ASCI file into a keyring?
One of our trading partners is asking to send us files encrypted with
the above cipher. The code they use themselves is show below but I'm
wondering on how & where I'm to store the key values if not on a keyring.
Thanks in advance
Dave
public string DecodeString(byte[] encodedsource)
{
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
byte[] bytes = encodedsource;
MemoryStream memstream = new MemoryStream();
memstream.Write(bytes, 0, bytes.Length);
memstream.Position = 0;
SymmetricAlgorithm algorithm = SymmetricAlgorithm.Create("RijnDael");
algorithm.Key = key;
algorithm.IV = iv;
ICryptoTransform transform = algorithm.CreateDecryptor();
CryptoStream cryptstream = new CryptoStream(memstream, transform, CryptoStreamMode.Read);
StreamReader reader = new StreamReader(cryptstream);
string returnstring = reader.ReadToEnd();
memstream.Dispose();
reader.Dispose();
cryptstream.Dispose();
return returnstring;
}
|
|
|
|
|
Forgot describe what the keys look like. I've changed the actual vals for this post.
key = ABCDE%^$ABCDE-99
iv = ABCDE$*@ABCDE-99
|
|
|
|
|
Thats the issue symmetrical ciphers have.Where does one hide the private key.
|
|
|
|
|
Hiiii,
i need to change the color of the scroll bars of the text box and forms...
If any one done this pls guide me accordingly...
Thanx & Regards
Anuj Kamthan
Software Developer
Solversa Technologies,
Pune - 411007, India.
http://www.solversa.com
|
|
|
|
|
You can't do this. You only can change appearence settings in Windows.
Also you can draw scrollbar yourself.
Best regards, Alexey.
|
|
|
|
|
There is no as such setting to change the color of scorll bar...
and abt drow the scroll bar did u mean i should creat custom scroll bars..
Like u can see in Windows xp it shows the scroll bars in blue color
Thanx...
Anuj Kamthan
Software Developer
Solversa Technologies,
Pune - 411007, India.
http://www.solversa.com
-- modified at 5:57 Wednesday 10th May, 2006
|
|
|
|
|
Jax_qqq wrote: did u mean i should creat custom scroll bars.
Yes. But, maybe you can find some third party components with color property.
Best regards, Alexey.
|
|
|
|
|
Ok Thanx a lot for your help...
i will try to search some third component...
thanx ones again
Anuj Kamthan
Software Developer
Solversa Technologies,
Pune - 411007, India.
http://www.solversa.com
|
|
|
|
|
Hi folks,
i have to go to develop the browser application if any one have an idea plz share with me.
Best Regards.,
ranandbe
|
|
|
|
|
|
How to open "Windows Image and Fax Viewer" from .net application i have to send an image as a parameter i guess
-- modified at 5:18 Wednesday 10th May, 2006
|
|
|
|
|
Hi
Does anyone have or know of a site that can show me how to solve a quadratic equation (x2+x+4=0) getting the value of x.Im using C# and i checked the .NET help and nothing useful came up.
Thanks alot i would really appreciate any information that might help.
|
|
|
|
|
This should be fairly easy just look for algorithm. I have such somewhere in C:
:-O
<br />
#include <math.h><br />
#include <iostream><br />
<br />
using namespace std;<br />
<br />
int main( void )<br />
{<br />
float a, b, c;
<br />
float x1Real, x1Imaginary;
float x2Real, x2Imaginary;
<br />
double D;
<br />
cout << "Enter variable a: ";<br />
cin >> a;<br />
<br />
cout << "Enter variable b: ";<br />
cin >> b;<br />
<br />
cout << "Enter variable c: ";<br />
cin >> c;<br />
<br />
if ( a==0 )<br />
{<br />
if ( b==0 )<br />
{<br />
if ( c==0 )<br />
cout << "\nInfinite number of solutions" << endl << endl;<br />
else<br />
cout << "\nNo solutions" << endl << endl;<br />
}<br />
else<br />
{<br />
x1Real = -b/c;<br />
cout << endl << " Result: xl real = " << x1Real << endl << endl;<br />
}<br />
}<br />
else<br />
{<br />
D = b*b - 4*a*c;<br />
if( D >= 0 )<br />
{ <br />
D = sqrt (D) ;<br />
if( b >=0 )<br />
x1Real = (-b-D)/(2*a); <br />
else<br />
x1Real = (-b+D)/(2*a); <br />
x2Real = c/(x1Real*a);<br />
<br />
cout << endl;<br />
cout << " Result: xl real = " << x1Real << endl;<br />
cout << " x2 real = " << x2Real << endl << endl;<br />
}<br />
else<br />
{ <br />
x1Real = -b/ (2*a) ;<br />
x2Real = -x1Real;<br />
<br />
x1Imaginary = sqrt(-D);<br />
x2Imaginary = -x1Imaginary;<br />
<br />
cout << endl;<br />
cout << " Result: xl real = " << x1Real << endl;<br />
cout << " x1 imaginary = " << x1Imaginary << endl;<br />
cout << " x2 real = " << x2Real << endl;<br />
cout << " x2 imaginary = " << x2Imaginary << endl << endl;<br />
}<br />
}<br />
}
|
|
|
|
|
[LocalizableAttribute(true)] <br />
public string[] Lines { get; set; }
If this property is an Array? How can I add a text to a specific line or read a specific line?
this wont work
this.richTextBox.Lines[2] = "row 3";
|
|
|
|
|
Lines returns a read-only array. You can't set individual elements. However, you can replace the array:
string[] newLines = (string[])(this.richTextBox.Lines.Clone());
newLines[2] = "row 3";
this.richTextBox.Lines = newLines
--
I've killed again, haven't I?
|
|
|
|
|
|
Hi
Its very urgent . Can anyone help me in this problem?? I AM ABLE TO DO ALL THE OPERATIONS WITH OUTLOOK EXCEPT READING THE ADDRESS BOOK... PLZ HELP ME ..
Thanks in advance
Akhil
|
|
|
|
|
|
Thanks Robert for ur instant reply...
it helped me to some extend .. but i needed to access global address book.. i got it .. by the following code
int s=oNameSpace.AddressLists.Item(1).AddressEntries.Count;
for(int i=1;i<=s;i++)
{
lb.Items.Add(oNameSpace.AddressLists.Item(1).AddressEntries.Item(i).Name);
}
Thanks Again
|
|
|
|