trichview.com

trichview.support




Re: How to set the PageMargins when using the TOfficeConverter to convert the TRichview to Word(*.DOC) File format?


Return to index


Author

Message

Sergey Tkachenko

Posted: 02/24/2004 19:43:36


Addition: saving RVPrint's margins:


procedure TForm3.RichViewEdit1SaveRTFExtra(Sender: TCustomRichView;

  Area: TRVRTFSaveArea; Obj: TObject; Index1, Index2: Integer;

  InStyleSheet: Boolean; var RTFCode: String);


  function MMToTwips(mm: Integer): Integer;

  begin

    Result := Round(mm*1440*5/127);

  end;


begin

  if Area=rv_rtfs_Doc then

    RTFCode := Format('\margl%d\margt%d\margr%d\margb%d',

      [MMToTwips(RVPrint1.LeftMarginMM),

       MMToTwips(RVPrint1.TopMarginMM),

       MMToTwips(RVPrint1.RightMarginMM),

       MMToTwips(RVPrint1.BottomMarginMM)]);

end;





Powered by ABC Amber Outlook Express Converter