how specify paper orientation using DeviceInfo string for printin

G

Guest

Hello,

I found some code for printing a report (.rdlc) file without using the
ReportViewer control. This code prints in the Portrait orientation which I
presume is the default orientation. I am guessing there is a tag for paper
orientation but I don't know what that tag name is. Does anyone know how you
can specify landscape orientation with this deviceInfo string?

string deviceInfo =
"<DeviceInfo>" +
"<OutputFormat>EMF</OutputFormat>" +
"<PageWidth>8.5in</PageWidth>" +
"<PageHeight>11in</PageHeight>" +
"<MarginTop>0.25in</MarginTop>" +
"<MarginLeft>0.25in</MarginLeft>" +
"<MarginRight>0.25in</MarginRight>" +
"<MarginBottom>0.25in</MarginBottom>" +
"</DeviceInfo>";
 
G

Guest

I tried using this field name
<DeviceOrientation>landscape</DeviceOrientation> which did not have any
effect - still printing in Portrait:

string deviceInfo =
"<DeviceInfo>" +
"<OutputFormat>EMF</OutputFormat>" +
"<PageWidth>8.5in</PageWidth>" +
"<PageHeight>11in</PageHeight>" +
"<MarginTop>0.25in</MarginTop>" +
"<MarginLeft>0.25in</MarginLeft>" +
"<MarginRight>0.25in</MarginRight>" +
"<MarginBottom>0.25in</MarginBottom>" +
"<DeviceOrientation>landscape</DeviceOrientation>" +
"</DeviceInfo>";
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top