Author Topic: Is it possible to configure linked document defaults?  (Read 2214 times)

Thomas Arnbjerg

  • EA User
  • **
  • Posts: 88
  • Karma: +0/-0
    • View Profile
Is it possible to configure linked document defaults?
« 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.

Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 341
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
Re: Is it possible to configure linked document defaults?
« Reply #1 on: February 22, 2023, 01:07:50 am »
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.

Thomas Arnbjerg

  • EA User
  • **
  • Posts: 88
  • Karma: +0/-0
    • View Profile
Re: Is it possible to configure linked document defaults?
« Reply #2 on: February 22, 2023, 01:10:15 am »
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?

Thomas Arnbjerg

  • EA User
  • **
  • Posts: 88
  • Karma: +0/-0
    • View Profile
Re: Is it possible to configure linked document defaults?
« Reply #3 on: February 22, 2023, 11:21:06 pm »
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


Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 341
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
Re: Is it possible to configure linked document defaults?
« Reply #4 on: February 23, 2023, 07:13:53 am »
Thanks for sharing your solution!