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.
Regards,.
Queries | Response |
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. |
Hi Thibault,Thanks for your update.
Queries Response 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.Regards,Ramya T
let defaultSectionFormat: SectionFormatProperties = {
pageWidth: 595,
pageHeight: 842,
}
// Set default Section format
container.documentEditor.setDefaultSectionFormat(defaultSectionFormat); |