trichview.support
Re: Error LeftMarginMM |
Author |
Message |
Sergey Tkachenko |
Posted: 04/18/2002 13:59:08 Ops, you are right. The code "if (phW>phoX+PageWidth) then phW := phoX+PageWidth;" was added quite recently, to solve a very special problem when specified paper size (custom size) was less than actual paper size. (the problem can occur only with custom page size set programmatically, when this size is unsupported by the printer) But now I can see that this code does more harm than good, so I removed it. Contact me if you want a discount on registration (~30%) :) > I have seen your code and I don't understand this lines : > > if (phW>phoX+PageWidth) > phW = phoX+PageWidth; > > I think this condition is always true and create a false result when you > calculate : > TmpRM = MulDiv(RVPrint1->RightMarginMM, 5*lpx, 127)- > (phW-(phoX+PageWidth)); > because the right margin offset calculate is 0. > > i.e : > In my case, phw = 4960, phox = 100 and PageWidth = 4760. > > The "if" is true and phw is affected to 4860. > The right margin offset is calcultate to 0 (4860-(100+4760)) and not 100 > (4960-(100+4760)). > > So : Right margin = RightMarginMM + Right margin offset. > > I suppose the problem as same for Bottom margin Offset. > > |
Powered by ABC Amber Outlook Express Converter