Problem with PrintOut Method

G

Guest

Hi All,
I am trying to set print setting for excel file programatically and
used the PrintOut Method to give the print.

The problem is,for HP Laser Jet,its working fine but for Xerox Phaser
,its just hanging at the printOut Method.Is there any problem with printer
compatibility issues ?.

Or is there any way to do this differently. Kindly see below my
requirement.

I have to print an image file (.bmp,.gif,.jpeg) in LandScape Orientation
from an asp.net application. To set the page orientation,I have embedded the
image in excel sheet and set the page orientation property to landscape. I
used the PrintOut Method. but its not working.

ANy help in this regard is greatly appreciated.

Thanks
Shyam
 
N

NickHK

I guess it is something to do with the code you are using, but you did not
post anything.

Seems strange way to print an graphic though. There must a better way from
ASP.Net.

NickHK
 
G

Guest

Hi Nick,
Even without image also,its not working. Please find below the code


oXL= new Excel.Application
oWB=(Excel._Workbook)(oXL.Workbooks.Add(Missing.Value));
workSheet=(Excel._Worksheet)oWB.ActiveSheet;
((Range)Worksheet.Cells[2,1]).Value2="Test";


worksheet.PrintOut(Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,1,Missing.Value);

oXL.Quit();
oWB=null;
oXL=null;
Page.Visible=false;

The above code is working fine for HP Printer but not for Xerox Phaser 5500 DS
Kindly help

Thanks,
Prasad
 

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