Hello,
I have implemented an endpoint in my ASP.NET Core project which makes a conversion from DocumentEditor's SFDT file to PDF file. The conversion process and endpoint itself are working fine, however the output PDF file's paper size is set to Letter by default and I couldn't find anywhere (in documentation, forum threads and etc.) information about how and where to set the paper size to A4.
I had a very similar situation with Spreadsheet component, but luckily there was a method called CustomPaperSize in XlsIORendererSettings, where I was able to set the output PDF file's paper size to A4 in inches accordingly. Unfortunately for DocumentEditor, the DocIORendererSettings doesn't have the similar settings where I can change the paper size like in Spreadsheet's XlsIORendererSettings.
Could you please help me?
Best Regards,
Ignacy Mielniczek
Hello Suriya,
Even though setting the DocumentEditor's pageWidth and pageHeight accordingly to A4 size, it is not working as expected. For example:
this.documentEditorContainer.documentEditor.selection.sectionFormat.pageWidth = 595.30;
this.documentEditorContainer.documentEditor.selection.sectionFormat.pageHeight = 841.90;
The DocumentEditor generated PDF's paper size is different than other PDF pages generated by other components (which also have set paper size to A4).
Best Regards,
Ignacy Mielniczek
We will update the details shortly.
Hi Ignacy,
Can you please share the generated PDF document and input document whether in sfdt ot Docx format? that will be helpful for us to analyze regarding this issue.
Regards,
Suriya M.
Hello Suriya,
Thank you very much for the help.
I was able to finally fix the problem by myself, by setting the paper size to A4 format using the DocumentEditorContainer's onDocumentChange() method every time:
Thanks for your update.