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. Image for the cookie policy date
close icon

HTML to PDF conversion New Page Orientation

Hi.

i have this code in an html file to add a new page in a HTML to PDF conversion :

<p style="page-break-before: always;"></p>

is there a way to change the orientation of the new page from vertical to horizontal? i only need this last page on horizontal format, leaving the rest on vertical

3 Replies

GK Gowthamraj Kumar Syncfusion Team August 14, 2019 11:40 AM UTC

Hi Javier, 

Thank you for using Syncfusion products. 

We have analyzed the reported requirement, we do not have direct support for changing the orientation of particular pdf page when converting HTML to PDF. But we can achieve your requirement by getting the template of the converted PDF page and draw it to the new pdf document. For this, we have created a sample and convert the simple html file into pdf document with changing the orientation of last page in the document. 

We have attached the sample and their output documents for your reference. Kindly try the sample and let us know if it is suites your requirement. 

Please let us know if you need any further assistance on this.  

Regards, 
Gowthamraj K 



JA Javier A Aguilera August 16, 2019 05:16 PM UTC

Thank you for your help. 
I resolved my issue with the provided example =)


GK Gowthamraj Kumar Syncfusion Team August 19, 2019 05:41 AM UTC

Hi Javier 
 
Thank you for your update. 
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Gowthamraj K 


Loader.
Live Chat Icon For mobile
Up arrow icon