|
Hello
I'm trying to open the print dialog using the following code, tryin to set the selected printer to "PDF995" instead the default one
But it always shows the default
However I can manualy select "PDF995"
What am I doing wrong ?
Thans for any help
PrintDialog pd = new PrintDialog();
pd.PrinterSettings.PrinterName = "PDF995";
if (pd.PrinterSettings.IsValid)
{
int a = 1;
}
pd.Document = printDoc;
printDoc.DefaultPageSettings.Margins = printmargins;
pd.AllowCurrentPage = true;
pd.AllowSelection = true;
pd.AllowSomePages = true;
pd.AllowPrintToFile = false;
if (DialogResult.OK == pd.ShowDialog())
{
SetupPrint(pd);
printDoc.Print();
}
|
|
|
|
|
I need to create PDF documents on the fly. I came across libraries such as iTextSharp, PDFSharp, PDFClown etc. Which one is better? Can anyone recommend one? I am using .Net 2.0.
|
|
|
|
|
CodingYoshi wrote: Which one is better? Can anyone recommend one?
Only you can choose the one that is the best for you. This is a highly subjective issue, and it's up to you to look at it based on the criteria that you think is important - for instance, is ease of use important to you, or support for the latest versions of the PDF format, or speed of PDF creation? Only you can decide which meets your criteria.
|
|
|
|
|
That is well said.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Why thank you sir. I do occassionally try to give an intelligent answer.
|
|
|
|
|
Seems like there's been a rash of PDF questions floating around here the past few weeks. Wonder what is up with that? [Checks calendar - no full moon for another 12 days ]
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Thanks for the reply. I need one that is compatible with .NET 2.0. Ease of use is important, but so is speed. Basically, one that can accommodate most of what you mentioned. Perhaps, one that people have used and have good things to say about.
|
|
|
|
|
Hai u can use pdfnet library
for more queries see this link
http://www.pdftron.com/net/index.html
RamyaNaidu
|
|
|
|
|
Hi all...
is there any way to get path of the image from imageList....
Regards
Vayanan
|
|
|
|
|
Hi,
ImageList is only used to store images. It does not have the option to return the actual path
of the images.
Regards,
Allen
Allen Smith
ComponentOne LLC
www.componentone.com
|
|
|
|
|
Correct. One option to circumvent this problem might be to add the file path of the image into the Tag property of the Image instance, something like:
Image someImage = Image.FromFile(filepath);
someImage.Tag = filepath;
imageList.Add(someImage);
This might cause problems though when the user renames/deletes/moves the actual image while the application is running. But this could be handled using a FileSystemWatcher to react to these actions.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thanks Alot...
Regards
Vayanan
|
|
|
|
|
path??? there is none. Are you thinking of uploading pictures to a database? search here int the articles, there is plenty of info.
Good luck
nelsonpaixao@yahoo.com.br
|
|
|
|
|
Hi,
I had written service which will fire for every 3 seconds.Actually I had written a service which fire when an user open a word document and click print button on it.For this Iam using WMI from that Iam checking jobs for every 3 sec.
Now I want to make my service work only when a print button(i.e., normal print option from notepad,wordpad,document....like..)is fired.
I think i have to watch the events.....how to do that i have no idea..
Kindly help me and guide in proper way..
Thanks
|
|
|
|
|
hi
did u try to study the links i posted you
Vikas Amin
UNITED STATES STEEL CORPORATION
My First Article on CP" Virtual Serial Port "[^]
modified on Thursday, July 24, 2008 5:33 PM
|
|
|
|
|
Hi Vikas,
Iam very Thankfull to you....
Actually Iam unable to make the watch for new job in printer queue...to be frankly Iam not able to work on your last two posts because Iam at very beginning stage .....Kindly help me to understand easily....kindly simplyfy and tell me things....
Kindly don't think otherwise for troubling you.....
Iam very thankfull to you
|
|
|
|
|
Is there any article where i hide and show a panel.. prefebably in an animation manner that slowly slides in
|
|
|
|
|
Hi,
Well I am not able to find any such links, but probably you could try this given code which
implements sliding of panels. The basic implementation includes decreasing or increasing the
height of the panel on Timer tick.
For example: We have a Panel, Timer and a Button control. On button control we are closing and
opening the panel.
BEGIN CODE
<br />
bool close=false;<br />
<br />
private void timer1_Tick(object sender, EventArgs e)<br />
{<br />
if (close==false)<br />
{<br />
if (panel1.Height > 0)<br />
<br />
panel1.Height -= 10;<br />
<br />
else<br />
{<br />
timer1.Enabled = false;<br />
close = true;<br />
}<br />
}<br />
else<br />
{<br />
<br />
if (panel1.Height < 190)<br />
panel1.Height += 10;<br />
else<br />
{<br />
timer1.Enabled = false;<br />
close = false;<br />
}<br />
}<br />
<br />
} <br />
<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
timer1.Enabled = true;<br />
} <br />
END CODE
I hope this will help.
Regards,
Allen
Allen Smith
ComponentOne LLC
www.componentone.com
|
|
|
|
|
|
Hi Guys,
I am trying to find a property or method in Microsoft.Office.Iterop.Excel which will help me make a decision whether an excel file (can be any version of excel) has got any VBA code or macro. Can anyone help me with this.
So far I have found the following property that deals only with excel 4.0 worksheets:
Excel4IntlMacroSheets 'Returns a Sheets collection that represents all the Microsoft Excel 4.0 international macro sheets in the specified workbook. '
Excel4MacroSheets 'Returns a Sheets collection that represents all the Microsoft Excel 4.0 macro sheets in the specified workbook. '
Any help will be appreciated.
Thanks
happy coding!
|
|
|
|
|
You might want to rephrase your question in such a way that it makes it clear that you are attempting to do this in a C# implementation(Assuming that you ARE in fact trying to do this in C#) If you are not doing this in C#, you probably want to repost this in the appropriate forum. People sometimes get kind of "touchy" in here.
"I need build Skynet. Plz send code"
|
|
|
|
|
Hi, i have a datagridview and have bounded my datasource. When the gridview is loaded, the column name follows the table attributes name.
example
catID desc catName
I want to rename the column to Cat ID, Description, Category Name
How do i do that?
|
|
|
|
|
I assume you are talking about the column headers in the datagrid.
you can use the column aliases to rename your columns before binding the datasource to the dataset in design mode.
if you already have a bounded datasource then You can rename the column headers of the datagrid by using the following sample code
MyDataGrid.Columns["catID"].HeaderText = "Cat ID";
MyDataGrid.Columns["desc"].HeaderText = "Description";
MyDataGrid.Columns[2].HeaderText = "Category Name";
|
|
|
|
|
why don´t you do it in sql???
|
|
|
|
|