#1 2018-03-04 15:02:13

realsofo
Member
Registered: 2018-02-21
Posts: 6

Pdf with multiple columns under header

I would like to generate a PDF file by using TGDIPages method and having multiple columns under header.
In fact I would like to add also a logo picture under header.


Something like:


[HEADER HERE]
Quotation                                 [Some logo here]              My company name   
No. QUO-10 / 04.03.2018                                                   Street name, No. 3
Customer: Microsoft                                                          Country
____________________________________________________________________________


[CONTENT HERE]
| Pos   |  Description                                            |
| 1      |  Product description with multiple rows        |
| 2      |  Product description with multiple rows        |

____________________________________________________________________________

[FOOTER HERE]
Software name                                                                                 page 1/2



With TPdfDocumentGDI it's easy to arrange the text on canvas, but with this method I had difficulties with calculation of pagination.

Please some suggestions.

Offline

#2 2018-03-05 20:02:09

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,238
Website

Re: Pdf with multiple columns under header

You can use the OnStartPageHeader and OnEndPageHeader events to add your own content to the header.

Those events are triggered before and after the TGDIPages.DoHeaderFooterInternal method, which draws the default header information.

Offline

#3 2018-03-09 00:30:44

realsofo
Member
Registered: 2018-02-21
Posts: 6

Re: Pdf with multiple columns under header

Thanks Arnaud! Works perfect!

Offline

Board footer

Powered by FluxBB