[英]Can visualforce's RenderAs PDF include href links?
We're using SalesForce's renderAs="PDF" option, and we want a clickable link in the body of the generated PDF. 我们正在使用SalesForce的renderAs =“ PDF”选项,并且希望生成的PDF正文中有一个可单击的链接。 Is this possible?
这可能吗?
I have tried an <a href="...">...</a> and I've tried <apex:outputlink value="...">...</apex:outputlink>, both result in a non clickable rendered version. 我已经尝试过<a href="..."> ... </a>,并且已经尝试过<apex:outputlink value =“ ...”> ... </ apex:outputlink>,两者均会导致在不可点击的呈现版本中。
Has anyone found a way that works in salesforce's engine? 有没有人找到一种在Salesforce引擎中起作用的方法?
<apex:page standardController="Opportunity" showHeader="false" renderas="pdf">
<apex:outputLink value="https://google.com">https://google.com</apex:outputLink>
<table border="0" cellspacing="0" cellpadding="0" width="100%" id="table1">
<tr>
<td>
...
Update : This is browser dependent. 更新 :这取决于浏览器。 Firefox doesn't let you click the link, Google Chrome does.
Firefox不允许您单击链接,而Google Chrome允许。
What type of link are you trying to render in the PDF, a relative link? 您尝试在PDF中呈现哪种类型的链接(相对链接)? Using outputlink I have previously had the same behaviour but only for relative links.
使用outputlink,我以前有相同的行为,但只适用于相对链接。
Using a full URL should render the hyperlink. 使用完整的URL应该可以显示超链接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.