Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Thomas Arnbjerg on February 22, 2023, 12:58:11 am
-
Is it possible to configure linked document defaults? - e.g. margins, page layout, page size, fonts, table borders.
So when creating a linked document without specifying a template the default settings apply.
-
You can create a Linked document template and use it when creating new LD, when the window is open just before editing a new document.
-
Thanks for the response.
I'm loading linked documents from external files from a javascript script and I can't find a way to control the formatting of these documents.
Any ideas?
-
Found a partial solution.
1) Create a document template 'foobar template' with the right margins, page dimensions
2) Instantiate a documentGenerator
3) Call NewDocument on the document generator with 'foobar template' as the argument.
4) Load the external RTF file into the document generator with LoadDocument
5) Save the document in the document generator as RTF with SaveDocument
6) Load the document from the previous step into the element as a linked document with 'LoadLinkedDocument'.
Margins and page dimensions are now correct
-
Thanks for sharing your solution!