trichview.support
Re: Print Error! |
Author |
Message |
sanegal |
Posted: 05/31/2002 17:15:33 I have test in every demo,the unicode character spacing printing on paper is dispeared. "Sergey Tkachenko" <[email protected]> wrote in message news:[email protected]... > Preview may be not very accurate in character spacing, but printing on paper > should be ok. > WYSIWYG is not supported yet. The only thing that you can do is to set > rv.MinTextWidth and rv.MaxTextWidth to value equal to paper width (between > margins). > But it is not guaranteed that lines will be wrapped exactly in the same > places as on the paper. > > The procedure below returns width and height of printable area, converted to > screen resolution. > > procedure GetScreenPageSize(RVPrint: TRVPrint; > var Width, Height: Integer); > var DC: HDC; > phoX, phoY, phW, phH, lpy, lpx, LM, TM, RM, BM: Integer; > begin > DC := RV_GetPrinterDC; // from PtblRV unit > > Width := GetDeviceCaps(DC, HORZRES); > Height := GetDeviceCaps(DC, VERTRES); > > lpy := GetDeviceCaps(DC, LOGPIXELSY); > lpx := GetDeviceCaps(DC, LOGPIXELSX); > > phoX := GetDeviceCaps(DC, PHYSICALOFFSETX); > phoY := GetDeviceCaps(DC, PHYSICALOFFSETY); > phW := GetDeviceCaps(DC, PHYSICALWIDTH); > phH := GetDeviceCaps(DC, PHYSICALHEIGHT); > > LM := MulDiv(RVPrint.LeftMarginMM, 5*lpx, 127)- phoX; > TM := MulDiv(RVPrint.TopMarginMM, 5*lpy, 127)- phoY; > RM := MulDiv(RVPrint.RightMarginMM, 5*lpx, 127)- (phW-(phoX+Width)); > BM := MulDiv(RVPrint.BottomMarginMM, 5*lpy, 127)- (phH-(phoY+Height)); > > if LM<0 then LM := 0; > if TM<0 then TM := 0; > if RM<0 then RM := 0; > if BM<0 then BM := 0; > > dec(Width, LM+RM); > dec(Height, TM+BM); > > DeleteDC(DC); > > DC := GetDC(0); > > Width := MulDiv(Width, GetDeviceCaps(DC, LOGPIXELSX), lpx); > Height := MulDiv(Height, GetDeviceCaps(DC, LOGPIXELSY), lpy); > > ReleaseDC(0, DC); > end; > > > > > Print Error!? > > if i set character spacing in editor,it looks no error,and in preview it > > have the right character spacing,but if i print it out,the character > spacing > > set dispear? > > And another question when to realize WYSWYG? it's very important for me!! > > > > > > |
Powered by ABC Amber Outlook Express Converter