1 reply [Last post]
ntw007
ntw007's picture
Offline
newbie
Last seen: 1 year 4 weeks ago
Joined: 2017-11-16
Posts: 2
Points: 3

Hi, I’m trying to create a PDF report consisting of running headers and footers which can be printed as PDF. I’m trying to use the @Page media module but I’m not even sure I should be. I’ve spent days looking into this and found examples that are supposed to work which don’t, yet parts of it do. I can use:

@page { size:A4; margin: 5mm; border:1pt solid blue; }

The page will be set as A4 and the margin will be adjusted to 5 mm, but the border will not change, but that is the least of my worries. Using:

@page {
@top-left { content: “Something goes here…”; }
}

@top-left (or anything else I choose around the margin) doesn’t work. It doesn’t show in the print preview and I’ve even tried printing to PDF and it still doesn’t show.

I am assuming that the module is part of CSS3 and nothing else is needed to be downloaded/installed?

Does anyone have any recent experience with this or know if it is worth using? Or even an alternative?

Thanks.

ntw007
ntw007's picture
Offline
newbie
Last seen: 1 year 4 weeks ago
Joined: 2017-11-16
Posts: 2
Points: 3

The light-bulb moment

So…I’ve found the problem to be the fact that Windows 10’s PDF converter doesn’t support it. I installed PrinceXML and after converting the html file everything displayed as expected.

The problem being that the desired view is not rendered at print preview stage and I’m definitely not paying the prices they charge for this software. I’m uninstalling it pronto!

So, back to square one…how can I use running headers and footers without having to use @page?

Any ideas please??