trichview.com

trichview.support




RTF import & margins


Return to index


Author

Message

Bil

Posted: 04/24/2002 20:43:02


Am I missing something? I create an RTF document in Word, set the margins

in 'Page Setup' - yet when I try and load it into RichView & print it, the

margins are not picked up from the RTF file. I'm using version 1.6.28.


Code is:


  ...

  rvBody.RTFReadProperties.SetHeader(rvHeader.RVData);

  rvBody.RTFReadProperties.SetFooter(rvFooter.RVData);

  // load file

  rvBody.LoadRTF(OpenDialog1.FileName);

  // format document

  rvBody.Format;

  rvHeader.Format;

  rvFooter.Format;


then printing:


  with RVPrint do

  begin

    // assign margins to be the same as anything read from RTF document

    HeaderYMM := rvBody.RTFReadProperties.HeaderYMM;

    FooterYMM := rvBody.RTFReadProperties.FooterYMM;

    // Initialise the headers & footers for printing

    SetHeader(rvHeader.RVData);

    SetFooter(rvFooter.RVData);

    // Assign the source for the body part to print (the headers & footers

are already linked)

    AssignSource(rvBody);

    // Format everything before printing

    FormatPages(rvdoAll);

    // do it

    Print('', 1, False);

  end;





Powered by ABC Amber Outlook Express Converter