I have a problem when I'm wrapping images with an anchor tag in the header in a page that is rendered as PDF.
When I wrap an image with anchor tag in the header the image gets rendered OK, but without the tag i.e. not clickable.
Text and other images in the body(content) of the page get's rendered with the tag correctly.
How can I use anchor tag on images in PDF header? I suspect it has something to do with:
position: running(header);
This is my page:
<apex:page controller="quotePDFController" title="Quote" renderAs="PDF" sidebar="false" showHeader="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false" docType="html-5.0">
<head>
<style type="text/css" media="print">
@page {
size: A4;
margin-left: 1cm;
margin-right: 1cm;
margin-top: 4.5cm;
margin-bottom: 1.8cm;
@top-center {
content: element(header);
}
@bottom-right {
content: counter(page) "-" counter(pages);
font-family: "Arial" "Sans-Serif";
font-size: 10px !important;
font-variant: normal;
font-weight: 400;
line-height: 20px;
color: #000000;
padding-right: 5px;
padding-bottom: 120px;
}
@bottom-left {
content: "TEST";
font-family: "Sans-Serif";
font-size: 7px !important;
font-variant: normal;
font-weight: 400;
line-height: 20px;
color: #000000;
padding-left: 5px;
padding-bottom: 115px;
}
}
body {
font-family: "SansSerif";
font-size:9px;
}
div.header {
padding: 10px;
position: running(header);
}
div.footer {
display: block;
padding: 5px;
position: running(footer);
}
</style>
</head>
<div class="header">
<div>
<a href="https://google.com">
/* here <a> doesn't work */
<img align="left" src="{!$Resource.LOGO}" height="75px"/>
</a>
</div>
<div style="margin-top: 10px;">
<a href="https://google.com">
/* here <a> doesn't work */
<img align="right" src="{!$Resource.ISO9001Logo}" height="50px"/>
</a>
</div>
</div>
<div class="footer"/>
<div class="content">
/* here all is good */
</div>
Thank you,