Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: molla on February 23, 2003, 04:06:00 am
-
I am using the RTF document generation extensively. I have a strange problem when the generated RTF document ends up having the "Letter" paper size, whereas I have set everything to "A4" in the EA model. I have gone through it severla times, but I could not find out where the "Letter" size may have been set. I did not see any explicit setup for RTF generation paper size.
I use the RTF file as a subdocument to a master Word document that sets up the format, page size, etc. that is required and therefore the RTF file screws up my setup with its Letter setting.
-
Hi Molla,
The RTF documentation is generated using the RTF template selected in the RTF generation window (called "Style"). If that style is not <basic> or <formal>, you are able to change that template.
No open the Resource View tab (Project Explorer), open Templates, RTF Style Templates and doubleclick the style that you have selected for the RTF document.
A window pops up where you can change the RTF code that is generated for specific features. Click on "Basic Style" and see the RTF code that is used at the beginning of an RTF document appear on the right.
I will not go into detail on RTF syntax, but just show the quick fix:
- locate "\marglxxxx\margrxxxx" just after the info section near the end.
- Replace that text by "\paperwxxxxx\paperhxxxxx\marglxxxx\margrxxxx\margtxxxx\margbxxxx"
A4: \paperw11906\paperh16838
Letter: \paperw12242\paperh15842
margins of 25mm: "\margx1417" where x = l(eft), r(ight), b(ottom), t(op).
- Locate "\headery454\footery709" and replace the numbers for different header and footer sizes (see below);
Its seems like the units used in RTF follow the next rule:
1 mm = 56,69 units
Hope this helps you, if not I guess you know where to reach me.
Greetings,
Tjerk Langelaar
Ps: Some links on RTF:
http://www.logictran.com/RTF/RTF114_c.htm
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnrtfspec/html/rtfspec.asp
-
Thanks, it worked! :)
I also found this document "Word 2002 RTF Specification Final.doc" on the MSDN site, that describes the RTF specifications in detail and can be used to format your generated RTF document very nicely.
-
Now that we are talking about RTF Styles, does anybody know a way to export a style defined in a document so that it can be used with other documents?
Levent Mollamustafaoglu
-
FOR EA: Exporting EA RTF styles? I haven't found it, but I really need it!
FOR WORD: I have a Dutch version of Word over here, so I don't know all the exact terms. Here it comes:
- Open the Word that you want the style to be copied to;
- Select menu Extra/Templates and plugins (or something equal);
- Press the button on the lower right (configuration?);
- On the first tab, the styles are shown;
- Press "Close file" for the right document (probably normal.dot, or another template);
- Then press "Open file..." and select the file from which you want to import a style;
- Then select the styles and press the "Copy" button;
But I guess you where looking for the EA export method :-/.
Greetings,
Tjerk
-
I don't think that an "Export/Copy RTF style" feature exists. I could really use it too. What I do is to copy the RTF-text for each of the elements that I have changed to a text editor, create new template, and paste the text back in.
Maybe someone else will send a feature request to Sparx? I think the large number of requests coming from me is becoming conspicuous! ;)
Mikkel