PDF template, header with image

Author Message

Piotr Switkowski

Sunday 26 March 2006 12:54:34 pm

Hi,

I just started reading PDF export documentation and I do not see any way to have a page header displaying the company logo on each page. This looks to me quite basic requirement. Any help ?

I realised that there is no function to create header that display on every page. pdf(header,...) does not create header but only section title. This is strange, as you could create footer. In addition header and footer cannot inlude images. To me, pdf export looks really weired, but maybe I am missing something....

Regards

Kåre Køhler Høvik

Sunday 26 March 2006 11:43:47 pm

Hi

You can use the header_block. See: http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_pdf_functions/header_block

block_code can be any kind of template code. Tip: use set-block to set it.

Kåre Høvik

Piotr Switkowski

Monday 27 March 2006 1:49:23 am

Thanks for advice. Could you please explain the documentation: "This function is not documented because there are some problems with it"? What kind of problems? Should I still use it or not?

Regards

Kåre Køhler Høvik

Monday 27 March 2006 2:05:05 am

Hi

It's been reported to be a bit unstable, but I recommend you try it.

Kåre Høvik

Piotr Switkowski

Tuesday 28 March 2006 4:25:37 am

Thanks for advice.

Now I have a problem how to force pdf export to include headers/footers on every page. I realised, that this could be achieved by defining page numbers. However, this method is not very good for me, I need to have definition of footer before the actual text - otherwise footer overlays the text. Is there any other way of displaying footers or headers on every page?

In fact, what I also need to achieve is to generate pdf file with backgroung in the different color than white. Could this be easily achieved in ezPublish?

By the way, the documentation on {pdf(page_number)} is completely wrong. The page_number is not recognised by ezPublish, it should be pageNumber. Also pageNumber takes parameters and there should be the pair of tags: start and stop.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 06:28:49
Script start
Timing: Jan 31 2025 06:28:49
Module start 'layout'
Timing: Jan 31 2025 06:28:49
Module start 'content'
Timing: Jan 31 2025 06:28:49
Module end 'content'
Timing: Jan 31 2025 06:28:49
Script end

Main resources:

Total runtime0.0124 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0040 588.1328151.2109
Module start 'layout' 0.00400.0026 739.343836.6641
Module start 'content' 0.00660.0043 776.007894.0469
Module end 'content' 0.01090.0014 870.054733.9922
Script end 0.0123  904.0469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002217.9751140.0002
Check MTime0.00108.1461140.0001
Mysql Total
Database connection0.00075.357410.0007
Mysqli_queries0.002217.598830.0007
Looping result0.00000.129310.0000
Template Total0.00119.110.0011
Template load0.00096.994010.0009
Template processing0.00032.055310.0003
Override
Cache load0.00065.002310.0006
General
dbfile0.00021.912580.0000
String conversion0.00000.063740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs