Click to See Complete Forum and Search --> : Landscape page orientation problem


Lecha
March 31st, 1999, 07:20 AM
Help me please with mysterious problem with my printer.I have Windows-98 and

Epson LX-800 printer,standard Win98 driver ver.3.0.To uderstand problem, please

try to do(I have VC++ ver.6.0): Create new SDI project with printing and preview

and CView or CEditView and write in OnDraw():

void CTmpView::OnDraw(CDC* pDC)

{

CTmpDoc* pDoc = GetDocument();

ASSERT_VALID(pDoc);

if(pDC->IsPrinting())

pDC->TextOut(0,0,_T("Some text.."));

}

then run it and try PrintPreview and Print, OK it works. Then in PrintSetup change page orientation to landscape,

PrintPreview continues to work OK, but

if you try to Print... Printing starts into wrong corner(not in right top but in left top)and font becomes absolutely

indecipherable.In the same time Wordpad and Notepad work well(I have inspected DEVMODE,it was the same).I have spent

about three days to solve this:(GetViewPortOrigin return (0,0),GetTextAlign()return 0(TA_TOP),change fonts and mapping

modes,reinstall printer and even Win98, and etc.). In the same time on my second printer(HP LaserJet 4v)it works OK in

all orientations. The only way i have found to solve it, was:

void CTmpView::OnDraw(CDC* pDC)

{

CString str;

CSize size;

CTmpDoc* pDoc = GetDocument();

ASSERT_VALID(pDoc);

str=_T("Some text..");

size=pDC->GetTextExtent(str);

if(pDC->IsPrinting())

pDC->TextOut(0,size.cy,str);

}

The questions are: Have anybody occured same problem, is that problem common to all matrix printers,is that bug of

printer, driver, Win98, MFC or ...,and, at last,how i can to get a rid of this problem.

Sorry for my English.

Thanks in advance.