We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Positioning image in header


i am trying to generate a pdf reoprt.
i need the header for the report to contain an image (at the top right of the header)
, a title (top left)
, a report date (center below the above)

i cannot for the life of me work out how to get something to sit at the top right. i have looked through the API docs with no luck.
any help you could provide would be happily received.

also data for this report is being generated by making a datatable and then calling the table.ImportDataTable(dt, true, 0,0, dt.rows.count, dt.columns.count);

however again having looked through the docs, its doesnt appear clear to me how to get the headers to repeat on each page of the pdf. i presume there is a way to do this…?



Hello Nat,

Thanks for considering Aspose

Please visit the following link for required information on Image & Page Number in Header/Footer section

In order to Right align the image in Header/Footer, set the Image.ImageInfo.Alignment property value to AlignmentType.Right. In order to set the title information as Left aligned, please specify the value of Text.TextInfo.Alignment to AlignmentType.Left.

In order to repeat the header over each page of the document, please visit the following link for required information. Set Page Header and Footer

In case it does not satisfy your requirement or you have any further query, please feel free to contact. We apologize for your inconvenience.


thanks for the reply
the alignment worked a treat.

however i think i was a little unclear about the headings repeating comment. what i was referring to were the headings of the table, not the page headings…

is there a way to let the pdf doc know that a page break has been reached and to re-output the table headings, or do i have to make the table headings part of the header itself?
this is a bit difficult as the headings will change through the data. ie when a particular item in the datatable is hit, i need to change some of the heading text…
should i be making a fresh section for each of these occurrences?


Hello Nat,

In order to repeat the header row of table on each page, please set the value of IsFirstRowRepeated property of Table class to true. In case you still face any problem or you have any further query, please feel free to contact.