Different header and footer as well as page orientation

Can we achieve all of the below mentioned points with Aspose PDF. I’ve downloaded the trial now and would like to know more about it

  • Have separate header and footer for cover page and content page
  • Have different orientation for cover page and content page. For example, first two pages of reports are portrait while other pages are landscape.
  • Also, images are being stored in SQL Server database. Does tool support images stored in database?
Above points are required as existing reports are given to client in mentioned format.

Hello Rakesh,

Thanks for considering Aspose.

As per DOM (Document Object Model) of Aspose.Pdf, a PDF document contains one or more sections. Where each section can have one or more paragraphs. Image, Text, Graphic Object, Attachment etc are paragraph level elements. By default each section starts over new page and the Header/Footer and page orientation for specific section can be defined individually.

As per your requirements, you can create two section objects. For first section, specify the Header/Footer and specify page orientation as portrait (default). Then create another section, specify its Header/Footer and set the page orientation for all the pages in section2 as Landscape using sec1.IsLandscape = true.

Concerning to your requirement on reading images from database and adding them to pages of PDF, currently Aspose.Pdf supports the capability to add images from file, MemorySteam or web location. If you can read the contents of image from database and store them into some MemoryStream object, you can easily add them to the PDF document.

Please visit the following links for information on,

In case it does not satisfy your requirements or you have any further query, please feel free to contact.