Trying to make a letter template

I have the trialversion of documentEditor running im my angular application. I try to generate a JSON File that acts as a template for the letter. I have problems positioning the Items like address, date and subject. First I tried to use shapes and positionned them relative to the MArgin or the Page. This seemed to work at the first glance, but trouble starts when I have a pagebreak, then my positioned items are transferred to the second page. I only want to have the address, date and subject on the first page. Then I tried another approach. I made set differentFirstPage to true and positioned the items into the firstPageHeader, but in order to access these items (address, date and subject) I have to make the header distance very big to be able to click inside and reach my text. But then the offset on the following pages is also very big - Is there a way to have differnet Header sizes or margins on the fistPage and following pages ? I cannot find a "sectionFormat" block inside my firstPageHeader - it seems that the sectionFormat is the setting for the entire document ... Is there any way to have different margins on first and following page


2 Replies

SM Suriya Murugan Syncfusion Team February 4, 2022 12:34 PM UTC

Hi Thomas
  
We will check your requirement and will update further details by February 7,2022. 
  
Regards, 
Suriya M. 



SM Suriya Murugan Syncfusion Team February 8, 2022 03:49 AM UTC

Hi Thomas, 

Apologies for the delay! 

1.      You can add the section break instead of page break from this you can create the different section format for first page alone. 
2.      Otherwise, you can load the header template using paste API. Please check below sample for reference: 

code snippet: 

container.documentEditor.selection.goToHeader(); 
container.documentEditor.selection.sectionFormat.differentFirstPage=true; 
container.documentEditor.editor.paste(JSON.stringify(headerString)); 
 

Note: headerString contains header content in SFDT format. 

Please let us know if you have any questions. 

Regards, 
Suriya M. 
 


Loader.
Up arrow icon