- Home
- Forum
- Angular - EJ 2
- DocumentEditor losing layout settings
DocumentEditor losing layout settings
Hello,
We are using Syncfusion's DocumentEditor component v. 23.1.40
We have noticed a very strange behavior that after setting the Page Layout Settings to Landscape in a Document, save it, then when we go to another window or close the tab and open back the specific Document, the Page Layout Settings is set to Portrait mode back.
It seems like the Page Layout Settings is not saved in SFDT format or it is not mapped correctly when we open the specific Document from SFDT format.
For your convenience, I have attached screenshots
Best regards,
Ignacy Mielniczek
Attachment: DocumentEditor_losing_layout_settings_problem_dc949348.7z
Hi Ignacy,
We have seen the attached screenshots. Based on your information, you are facing a portrait mode back issue in the downloaded SFDT. We checked the reported issue in the version(v23.1.40) that you are facing and the latest version(23.2.6). But we were unable to reproduce the reported issue, and we have attached the sample we used to try to replicate the issue. Could you please share the sample used on your end with the input document or modify the attached sample to reproduce the mentioned issue? Thereby, we will analyze further and provide you with the appropriate solution at the earliest.
Sample - 99nshj (forked) - StackBlitz
Please find the attached video below for your reference.
Regards,
Balamurugan S
Attachment: Landscape_55af329c.zip
Hello Balamurugan,
Thank you for a quick response.
I'm sorry I totally forgot to add that the same is happening on the latest version of DocumentEditor v. 23.2.4.
Let me check your and get back if the issue is happening on 23.2.6 and if so, I will provide more information like example SFDT file.
Best regards,
Ignacy Mielniczek
Thanks for the update! Ignacy
We will wait until we hear from you.
Hello again Balamurugan,
I'm sorry, I know what was causing this, but I want to clarify few things first and have an extra question.
We are exporting SFDT text from DocumentEditor by using its serialize method and storing it to our Database. For example:
const sfdtJson = this.documentEditorContainer.documentEditor.serialize();
Then, when the user enters the screen where there is DocumentEditor, we check if there are any stored SFDT already in our Database, if yes, then we load this SFDT text using the method DocumentEditor's open method. For example:
this.documentEditorContainer.documentEditor.open(sfdtJson);
Beside that we were setting the pageSize to A4 size using the below code:
this.documentEditorContainer.documentEditor.selection.sectionFormat.pageWidth = 595.30;
this.documentEditorContainer.documentEditor.selection.sectionFormat.pageHeight = 841.90;
And it was causing pageSetting to be set back to Portrait mode.
Could you please tell me where is exactly stored the pageSettings layout if it is set to Portrait or Landscape in SFDT file?
I have attached a sample SFDT json in sample.txt file.
Best regards,
Ignacy Mielniczek
Attachment: Sample_SFDT_JSON_127dc29d.7z
Hello once more again Balamurugan,
I'm happy to inform you that I was able to resolve the issue on my side.
Thank you very much for the help.
Best regards,
Ignacy
Thanks for the update! Ignacy
We are happy to hear that you resolve it.
- 6 Replies
- 2 Participants
-
IM Ignacy Mielniczek
- Nov 29, 2023 03:56 PM UTC
- Dec 4, 2023 05:45 AM UTC