|
Hi all,
I am trying to export image to PDF file using iTextSharp dll.
I created a PDF file(test.pdf) and added image to that pdf file. But the problem is when the image is too large ,its not showing the full image in pdf file.
when the image height is large, i am automatically getting the vertical scroll bar in pdf file. but for width i am not getting any horizontal scroll bar.
Please suggest me how to export large images to pdf file without resizing the image. I s there any way to get the horizontal & vertical scroll for PDF file.
Thanks in advance
|
|
|
|
|
Is there anyway to get this expression to work without getting an overflow execption?
Answer = (PublicKeyB^PrivateKeyA)Mod(PublicKeyA)
the public and private keys are supposed to be 9 digit numbers example: 123456789
i've tryed using System.Math.Pow but it uses Doubles and thats the source of the overflow
anyway, i would like to know if its posible and if it is, how?
|
|
|
|
|
As you are using the Mod operator, I think that you mean the VB meaning of the ^ operator. In C# the ^ operator means an exclusive or, and doesn't cause an overflow.
One nine digit number to the power of another nine digit number is way too large to fit in any integer type (unless you have a 32000000000 bit integer laying around...). It's even way too large to fit in a double or a decimal.
What is it that you try to accomplish with this calculation? It doesn't really make any sense.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
the formula i wrote there is not any kind of code, it is written in human language, i know for ^ i should use Pow(base,exponent) and for Modulus i should use %;
it is supposed to be a formula to calculate a value in order to calculate another value to prove the basis of cryptography to my teacher in classroom. (it is supposed to be somehting simple)
anyway, i just wanted to know if it was possible to do without getting an overflow
|
|
|
|
|
I think that the .Net framework 3.0 or 3.5+ ships with a class named BigInteger that can fit your needs.
There are a lot of similar free classes available (I beleave at least one in CodeProject and one in the mono project)
|
|
|
|
|
Hello,
I am trying to create a dll using c++ that I can then use and call functions out of in C#. I have a general idea of what to do, but I don't know the specifics. I am using visual studio 2005. What type of project should I create in c++? Does anyone know of any source code out there that might have some simple exambles? Once I have created my dll, I add it to C# as a reference. But after that what do I do?
|
|
|
|
|
You would use Platform Invoke to call from C# into the DLL.
Read the help for Platform Invoke.
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
Depends, if your using the .Net framework for the c++ DLL then you use it like any other class. If you're not using the .Net framework for the c++ dll then you will have to use P/Invoke
As for the type of project to make, I think you just need to make a Class Library.
My current favourite word is: Nipple!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Is there any specific reason why you need the dll in C++? If your C++ dll is on .NET framework, you can directly add reference to your c# project. Alternatively, you can use C++/CLI other than C#. So you can use the C++ classes by just importing the necessary headers.
|
|
|
|
|
Hello Friends,
protected void grdEncounter_RowDataBound(object o, GridViewRowEventArgs e)
{
GridViewRow grdEditRow = e.Row;
if (grdEditRow.RowType.Equals(DataControlRowType.Header))
return;
grdEditRow.Cells[2].Text = grdEditRow.Cells[2].Text.Equals("1") ? "Yes" : "No";
}
error comes in above line
Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index
This is the error while loading itself i don't know how to solve.
Regards
JK
|
|
|
|
|
seems like your grdEditRow.Cells doesn't have a cell with index = 2
Intelligence is almost useless for those who have nothing else!
Email: caiokf@gmail.com
|
|
|
|
|
I suspect that grdEditRow.Cells[2] doesn't exist for some reason. Try running in debug and have a look exactly where it errors and you should be able to see the cause.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
You already got replies here[^], here[^] and here[^]. Please keep your question in a single thread, and follow up on the replies that you get.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I have to get the price (currency) from a database table, but I can not assign double & Decimal variable to it, which define type I should use?
|
|
|
|
|
If you're using SQL Server use SqlDbType.Money or SqlDbType.SmallMoney .
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Unfortunately I had MS Access database instead, but when I used VB.net then I defined Decimal type is OK!
Also I can not re-define the database differently, because other applications are still using them (VC++)
Any new suggestion?
Thank
|
|
|
|
|
Could you post the parts of the code that are not working. I don't quite see why decimal wouldn't work.
Also are getting an exception. If so, what is it?
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hi,
I need to create a list box with 4 columns: text, 2 radio buttons & a check box. I am using VS2003. Can somebody let me know how to get about to do this or if there is an alternative way around it.
Any help would be greatly appreciated.
|
|
|
|
|
|
Could not resist having a go at the moniker
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Half-Wit, sorry Life got it right, use a datagridview. You will need to add the radiobuttons manually but the will article on CP to help.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I just cant figure out how to open an existing playlist using the WMPLib.WindowsMediaPlayer object.
I have an existing playlist i want to open, but i have to somehow get it into an IWMPlaylist type first, yet i cant seem to find a method that will do this.
Can anyone help?
|
|
|
|
|
I'm not sure, but if it comes to it, it shouldn't be that difficult to read in the file yourself.
WPL files look kinda like this:
<?wpl version="1.0"?>
<smil>
<head>
<meta name="Generator" content="Microsoft Windows Media Player -- 10.0.0.4058"/>
<author/>
<title>Kaiser Chiefs</title>
</head>
<body>
<seq>
<media src="..\..\Kaiser Chiefs - Employment\Kaiser Chiefs - Everyday I Love You Less & Less.mp3"/>
<media src="..\..\Kaiser Chiefs - Employment\Kaiser Chiefs - I Predict A Riot.mp3"/>
<media src="..\..\Kaiser Chiefs - Employment\Kaiser Chiefs - Modern Way.mp3"/>
<media src="..\..\Kaiser Chiefs - Employment\Kaiser Chiefs - Na Na Na Na Naa.mp3"/>
</seq>
</body>
</smil>
So you should just be able to use XmlReader and reconstruct the playlist to a IWMPlaylist
My current favourite word is: Nipple!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
I can read them with an XmlReader no problem, but i cant get a .wpl file to a IWMPlaylist format so i can use the mPlayer.playlistCollection.importPlaylist(IWMPlaylist playlist) method;
I could recreate the whole playlist, by reading the xml and using the media src property to create new IWMPMedia items, then loading each of those into a new playlist, but i cant believe there isnt a simple way to import a playlist...
This is what i am doing at the moment:
<br />
playlist = mPlayer.newPlaylist(plName, openFileDialog.FileName);<br />
<br />
mPlayer.playlistCollection.importPlaylist(playlist);<br />
but this creates a copy of the playlist, so if i open playlist.wpl, i get a new file called playlist(2).wpl, appearing, then if i open it again later, i get playlist(2)(2).wpl.
I could delete the duplicate file every time i open a playlist, but im thinking there has to be a better way...
all i want is a method that lets me create a IWMPlaylist object from a path to a .wpl file.
MSDN has been absolutely no help...
|
|
|
|
|
I use Winforms RichTextBox control to edit scripts. Scripts are plain ascii texts.
When error occurs, script engine returns character position of error in code as integer.
How to position cursor to this character position ?
RichTextBox does not have current position property.
Andrus
|
|
|
|