merging multiple templates

  • I am attempting to merge multiple templates into one rtf. For an example, I have 2 templates, templates A & B.

    I have 2 TWPRichText components. I load one with a template A, merge some fields, then fastappendtext it into another TWPRichText component. I then load template B into the first richtext, merge some fields and fastappendtext it into the second TWPRichText component.

    This is resulting in one line being pushed to a second page, or just blank pages sometimes. If I merge all of my data for Template A by itself, or Template B by itself, all is fine.

    Is there a way to merge two different RichTexts into one RichText without loss of their individual properties? Each template is loaded/merged fine, when they are fastappendtext'd, they end up slightly different.

    What affect does calling fastcopyproperties have? If you call it after each merge, would it change the entire document's properties, or just that page?

    Any help is appreciated. Thanks!

    • Offizieller Beitrag

    Hi,

    You can only have one page information in the resulting text.

    If you need PDF or Print output you can use StartPrint/EndPrint to print multiple documents into one printer file. (wPDF. BeginDoc/EndDoc)

    FastCopyProperties copies numberstyles and page layout. It also makes sure the font and color tables can be mapped from one editor to the next. You should only call FastCopyProperties on an empty editor.

    Zitat

    Is there a way to merge two different RichTexts into one RichText without loss of their individual properties? Each template is loaded/merged fine, when they are fastappendtext'd, they end up slightly different.

    You can use SaveToStream/LoadFromStream for the second text.

    Julian