trichview.com

trichview.support.thirdparty




Problem saving to PDF using RolePDF.


Return to index


Author

Message

Parmod Gandhi

Posted: 05/13/2004 6:36:38


Greetings,


Can anyone tell what is wrong with this code.  The source RichViewEdit has

700+ items.  However, when it is saved to stream as RTF or RVF and loaded

into PDF, the target has no items.


Alternatively is there a better way to copy contents of one RichViewEdit to

another RichView for temporary use such as saving to PDF.


var

  rvPDF:     TRichViewPDF;

  MemStream: TMemoryStream;

begin

  rvPDF := TRichViewPDF.Create(nil);

  try

    rvPDF.AutoLaunch := true;

    rvPDF.CreateOutlines := true;

    ShowMessage('items: '+IntToStr(rvePad.ItemCount));

    MemStream := TMemoryStream.Create;

    try

      rveSource.SaveRVFToStream(MemStream, false);

      rvPDF.RichView.LoadRVFFromStream(MemStream);

      ShowMessage('Items: '+IntToStr(rvPDF.RichView.ItemCount));

      rvPDF.SaveToPDFFile('Readme.pdf');

    finally

      MemStream.Free;

    end;

  finally

    rvPDF.Free;

  end;


regards

Parmod





Powered by ABC Amber Outlook Express Converter