- Home
- Forum
- ASP.NET Core - EJ 2
- PDF header and footer with different page orientation
PDF header and footer with different page orientation
Hello
Suppose the following use case
After a couple portrait oriented (header /footer included pages I had to include a landscape oriented page. header and footer included however stretched out, and doesn't look so nice.
Is there a way to overcome this issue, or at least not included the header footer template on landscape oriented page?
SIGN IN To post a reply.
3 Replies
1 reply marked as answer
GK
Gowthamraj Kumar
Syncfusion Team
September 27, 2021 12:19 PM UTC
Hi Gergo,
Thank you for contacting Syncfusion support.
At present, we do not have direct support to skip the header and footer on landscape orientated page in our PDF library. As a workaround, we can achieve this by adding the header and footer on only portrait page of the PDF document by using the PdfSection available in PdfDocument instance. We have attached the sample and output document for your reference. Please try the below sample on your end and let us know if it is suites your requirement or not.
Note: When using PdfPageTemplateElement for header and footer, we are drawing the template based on the provided page, we could not have support to change the page orientation in this event, so that the header and footer content are stretched on landscape page.
Please refer the below documentation for more information,
Please let us know if you need any further assistance with this.
Regards,
Gowthamraj K
GE
Gergo
September 27, 2021 01:32 PM UTC
Hello
Thanks for the reply
Actually I solved it by making two separate PDFDocuments with different orientation and papersize but with same header and footer. It looks nice. After putting into streams I merged those into a final one.
Thanks, G
Marked as answer
GK
Gowthamraj Kumar
Syncfusion Team
September 28, 2021 06:44 AM UTC
Hi Gergo,
Thank you for your update. We are glad to know that your problem has been solved.
Please let us know if you need any further assistance with this.
Regards,
Gowthamraj K
SIGN IN To post a reply.