Hi all,

I have develop the c# console application in which I am going to print command with print orientation like landsacpe/Portrait. But I noticed that the actual setting of the file over writr the console command. For example I have a *.xls file and set its printing property as landscape. and when I try to print this file as portrait through console(COMMAND PROMT) it overwrite the command and print as Landscape.

here is code

if (args[2].ToLower() == "landscape")
oPS.DefaultPageSettings.Landscape = true;
else if (args[2].ToLower() == "portrait")
oPS.DefaultPageSettings.Landscape = false;

ali

I am also facing the same problem please someone help up

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.