We're using SalesForce's renderAs="PDF" option, and we want a clickable link in the body of the generated PDF. Is this possible?
I have tried an ... and I've tried <apex:outputlink value="...">...</apex:outputlink>, both result in a non clickable rendered version.
Has anyone found a way that works in salesforce's engine?
<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.
What type of link are you trying to render in the PDF, a relative link? Using outputlink I have previously had the same behaviour but only for relative links.
Using a full URL should render the hyperlink.
Related
On IE11, when there is a modal opened or a fixed element, the PDF's preview on just passed over all the content.
I tried to z-index etc but nothing seems to work, it works well on all other browsers.
Is there a solution only in CSS/HTML ?
Here's a example (only bugs on IE)
I try to check your sample code and find that you are using object tag to display the PDF which is not working in IE 11.
I suggest you to try to use Iframe to display the PDF in IE 11.
You can replace the object tag with code below may help you to solve your issue.
<div id="pdf">
<iframe src="https://www.vousnousils.fr/casden/pdf/id00264.pdf" style="width: 100%; height: 100%;" frameborder="0" scrolling="no">
<p>It appears your web browser doesn't support iframes.</p>
</iframe>
</div>
I am using this open source library for html to pdf. Everything is working, but when it comes to adding a <img src> tag, it is not showing the image I want in PDF. For example,
string image = "~/images/test.png";
string htmlToConvert = string.Format(#"
<div>
<table>
<tr>
<td>
<img srcset='{0}'>
</td>
</tr>
</table>
</div>", image);
Is there anything wrong with my format or is it simply just not supporting images? If it is true, any working library for asp.net core 1.1? (important because some libraries/suggestions were based on 1.0 which contained project.json file)
p.s. I am going to deploy it via Azure web app service
The image must be in the same folder as where the phantomjs executabels are.
Just take a look at method
PdfGenerator.WriteHtmlToTempFile
There you can see that your html is stored into a file in the phantomjs-installation directory. And this is the root of your html-file, which means that the images must be there too.
https://github.com/TheSalarKhan/PhantomJs.NetCore/blob/master/PdfGenerator.cs.
I suggest that you use the phantomjs-executabels directly to better understand what is going on.
I'm trying to use the dynamic HTML feature of Sideview to inject search results into my custom HTML. The problem is, any time I put a "Search" module into a dashboard the page hangs, and displays "Loading..." in the upper-right corner of the page. This happens even with an empty Search module. For instance, here is the page I'm trying to create.
XML:
<module name="Search" layoutPanel="panel_row1_col1" autoRun="True">
<param name="search"> | savedsearch last_command_by_engine</param>
<module name="HTML">
<param name="loadingText">Searching...</param>
<param name="src">last_commands_table.html</param>
</module>
</module>
last_commands _table.html:
<h1>Results: $results[0]$</h1>
<h1>Search: $search$</h1>
<table>
<thead>
<th>0</th>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
</thead>
<tbody>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tbody>
</table>
The HTML template is rendered but the search is not carried out. There's just the "Loading..." message at the top and nothing else happens.
I would move this question to "SplunkBase", if you are still having issues as that is the official Splunk forum. You can then tag the question with sideview related tags, and i'm sure the user "#sideview" would pick it up quite quickly.. He is usually very active on the forum and very helpful.
Not a direct answer, but hope it helps.
You may already have the answer but it is simply to move the HTML module out of the search module. Nesting like that won't work.
i want to use selenium to click on a specific button !
the send button on gmail, the standard version and not the basic html version
i tried
<tr>
<td>selectFrame</td>
<td>c16nfgbb415qzj</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//div[#id=':v9']/b</td>
<td></td>
</tr>
didnot work
give me python code please and not html
Thanks
You can't record a script in Selenium and play it back using standard Google Mail. Most of the HTML names/IDs/classes in standard Google Mail are unpredictable.
You'd have to use xpath-based targets with indices e.g. //div[2]/div/div[3]. This has a high-dependency on the structure of the HTML being served by Google Mail. As soon as it changes, you'll need to modify your script.
The basic HTML version is predictable enough to just record and replay a script. You didn't say why you don't want to use that.
I'm creating PDFs on-demand with ColdFusion's CFDocument tag, like so:
<cfdocument format="PDF" filename="#attributes.fileName#" overwrite="true">
<cfdocumentitem type="footer">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left"><font face="Tahoma" color="black"><strong>My Client's Corporation</strong><br/>Street address<br/>City, ST 55555</font></td>
<td align="right"><font face="Tahoma" color="black">Phone: 555.555.5555<br/>Fax: 555.555.5555<br/>Email: info#domain.com</font></td>
</tr>
</table>
</cfdocumentitem>
<html>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<!--- some content here ... --->
</table>
</body>
</html>
</cfdocument>
The problem I'm having is that sometimes (actually, most of the time, but not always) some of the footer text is there, but invisible. I can highlight it and copy/paste it into notepad, where I can see it all -- but in the generated PDF only the first line of the left column of the footer is visible, the rest is invisible. Hence why I added the font color of black in the code.
Any ideas on how to correct this?
A PDF is what I'm after, so I'm not sure how outputting another format would help.
As it turns out, the footer space just wasn't enough to fit all of this text; verified by the fact that changing the font size to 4pt would fit it all in without a problem.
I spent some time attempting to rewrite the footer code using DDX as outlined here and the CFPDF tag to implement it; but even after several hours of hacking away and finally getting a valid DDX as reported by the new isDDX function, the CFPDF tag reported that it was invalid DDX for some reason.
At this point I decided I had wasted enough of the client's time/money and just reformatted the footer to be 2 lines of centered text, which was good enough.
Usually when PDF shows blank text, it's because the font metrics are embedded in the document, but the glyphs are not. I know nothing about ColdFusion, but you might try the following:
Try a font other than Tahoma as a test. All PDF readers must support 14 basic fonts, including 4 Helvetica variants, 4 Times variants, 4 Courier variants, Symbol and ZapfDingbats, so those are always safe choices
See if ColdFusion offers any control over font embedding
Try a list of alternatives in your font declaration, like "Tahoma,Helvetica,sans-serif"