We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set Paper size by default

Thread ID:





143383 Mar 18,2019 09:44 AM UTC Mar 19,2019 09:21 AM UTC JavaScript - EJ 2 5
Tags: DocumentEditor
Asked On March 18, 2019 09:44 AM UTC


By default, the paper size of document editor is set to 'Letter' by default. There is any method to change the paper size default size value ? I only success to display the Page Setup dialog. 


Ramya Thirugnanam [Syncfusion]
Replied On March 18, 2019 10:49 AM UTC

Hi Thibault, 
Thanks for contacting Syncfusion support. 
Please refer to the below help documentation link for paper size in document editor. 
Ramya T  

Replied On March 18, 2019 02:25 PM UTC

Thanks for your answer, but it doesn't work, my page stay with the Letter dimension (612*792). I want to instantiate my documentEditor with the A4 dimension. When i change pageWidth and pageHeight, and print a 2 pages doc with header and footer, the second page's header is cut. There is any method looks like documentEditor.setPageSize('A4'); ? 

You will find my JS code in attachement. 


Attachment: document.js_69e97dd8.zip

Ramya Thirugnanam [Syncfusion]
Replied On March 19, 2019 08:42 AM UTC

Hi Thibault,  
Thanks for your update.  
Regarding "Page width and height"  
In DocumentEditor, width and height of the pages are updated based on the section format value present the document which we are loading in document editor.   
And in a word document, we can have more than one section and different page setting for each of them. So, if you load a document in DocumentEditor using 'open' method page size are reset to the values defined in sfdt or word document’s section format.  
Regarding "it doesn't work, my page stays with the Letter dimension (612*792)"  
We have validated the JS code you have provided in the attachment.  As we mention above, you are using ‘open’ method after setting page size which mark page size reset to the value present in the section format.  
So, please change the page size after opening the document as shown in the below sample to initialize DocumentEditor with A4 dimension.  
Regarding "2 pages doc with header and footer, the second page's header is cut"  
We are not able to reproduce the reported issue from our side. Could you please provide us an input document (sfdt or word document) to replicate the issue? So that we will investigate on it and provide you the appropriate solution at the earliest.  
Ramya T 

Replied On March 19, 2019 09:10 AM UTC

Thanks for your answer, it's work now ! 

The header cut problem is also solved with your solution. it was when trying to print a doc with Letter dimension with the titlebar Print functionality, when I open the preview before printing. Preview is A4 and Doc is Letter dimension. So now, it's solved. 

Thank you again (and sorry for my bad english, ahah) 


Ramya Thirugnanam [Syncfusion]
Replied On March 19, 2019 09:21 AM UTC

Hi Thibault,   
Thanks for your update. 
Ramya T 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon