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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

HTML to PDF conversion New Page Orientation

Thread ID:





146679 Aug 13,2019 10:06 PM UTC Aug 19,2019 05:41 AM UTC ASP.NET Core - EJ 2 3
Tags: PDF
Javier A Aguilera
Asked On August 13, 2019 10:06 PM UTC


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

Gowthamraj Kumar [Syncfusion]
Replied On 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.  

Gowthamraj K 

Javier A Aguilera
Replied On August 16, 2019 05:16 PM UTC

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

Gowthamraj Kumar [Syncfusion]
Replied On 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. 
Gowthamraj K 


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

Live Chat Icon For mobile
Live Chat Icon