简体   繁体   English

visualforce的RenderAs PDF是否可以包含h​​ref链接?

[英]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.

相关问题 PDF 注释/注释是否可以包含指向 PDF 中其他页面的链接? - Can PDF notes/annotations include links to other pages in the PDF? Pandoc:有没有办法在markdown中包含PDF链接的附录? - Pandoc: Is there a way to include an appendix of links in a PDF from markdown? PDF中的Mailto链接在Chrome的PDF查看器中不起作用 - Mailto links in pdf not working in Chrome's pdf viewer 单击指向 pdf 页面的 href 链接有时会将您带到您单击的上一个链接 (Edge) - Clicking href links to pdf pages sometimes takes you to the previous link you clicked (Edge) 我可以在CFDOCUMENT中包含另一个PDF吗? - Can I include another PDF in CFDOCUMENT? Courier Visualforce页面中以pdf呈现的新字体样式 - Courier New font style in visualforce page that is rendered as pdf 为什么我的自定义URI在浏览器栏中可用,而在PDF链接中却无效? - Why my custom URIs work in browser's bar but not in PDF links? pdf的深层链接href - Deep linking href in pdf 您可以使用PHP将PDF相对链接转换为超链接吗 - Can you convert PDF relative links to hyperlinks with PHP iPhone SDK是否支持PDF中的链接,并且可以在内部进行路由吗? - Does iPhone SDK support links in PDF and can they be routed internally?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM