TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Avinash nagabhushanam
NA
1
985
Trying to print a file which is .pmf file in c# application
Jul 13 2015 4:56 AM
I am trying to print a file which is .pmf file using print button which should display printer properties as well but after executing the below code I am getting a blank page as a result. Please, anybody can tell me what is wrong with the code shown below. I have added
PrintDialog control from Toolbox to the Form in Visual Studio.
private void btn_Print_Click(object sender, EventArgs e)
{
PrintDialog printDlg = new PrintDialog();
PrintDocument printDoc = new PrintDocument();
printDoc.DocumentName = "D:\\Project_Folder\\Soil_Units_PMF\\pmf\\KUM1_1G1b_Soilunits_Profile.pmf";
printDlg.Document = printDoc;
printDlg.AllowSelection = true;
printDlg.AllowSomePages = true;
//Call ShowDialog
if (printDlg.ShowDialog() == DialogResult.OK)
{
printDoc.Print();
}
else
{
return;
}
}
Reply
Answers (
1
)
how to find user control by tag value c#
which namespace contains SQLParams