Question
Last activity: 9 Jul 2018 5:37 EDT
Will HTMLtoPDF functionality works for URLs or Link control?
Will HTMLtoPDF functionality works for URLs or Link control for a section which i'm converting to PDF?
Thanks alot John...It worked after setting this pyPDFEnableHyperlinks to true
I haven't tried converting a section with a Link Control - I fear this might not work actually - because they aren't necessarily '<a href' tags....
OK: so I configured a LINK control on a SECTION with the 'Alternative Domain URL' option with the URL of:
"http://www.pega.com"
When I preview the Section - and check the DOM - it can been seen that the link is actually more complicated - and it really resolved at the Server Level:
http://prpchost:8080/prweb/tlgMX_nZtWE-XVwZKu3ySmoAntMQTh18*/!TABTHREAD3?pyActivity=Rule-HTML-Section.Visualize&insHandle=RULE-HTML-SECTION%20OF54UG-GCS-WORK%20MYTESTSECTION%20%2320180706T124107.034%20GMT&category=PREVIEW&pzPrimaryPageName=pyNewResults&target=popup&pzHarnessID=HID29BD05A572AB0F2DC455F1A72913F67B#
In fact: doing a VIEW SOURCE seems to indicate that the anchor element itself was generated by client-side Javascript.
If I'm not mistaken then, the above means:
1. Even if the Link did 'make it through' to the PDF: it is (probably?) not what you want - since this will cause a browser to launch 'at' PRPC, not to 'follow' the link. (Unless you did want that?)
2. The Link isn't 'going to make it through' - since it is constructed with Javascript; and (as far as I'm aware) - the HTMLTOPDF conversion process (PD4ML library) doesn't have a Javascript embedded in it.
You could consider just creating your own (custom) Section with 'Auto-generated HTML' switched OFF to create a simple link 'control' which creates static anchor link. ('static' - at least by the time it hits the client - you *can* use JSP tags to alter dynamically).
Also consider that 'link controls' in PRPC don't just have a one:one relationship with the html 'anchor' concept - you can attach your own events/action-sets to them - they can be used for things other than simple browser 'click-through-navigation'; so only a subset of 'links' would ever make sense to convert to PDF in any case...
I can confirm this does work - by setting the following HTMLTOPDF Parameter to 'true':
I just converted this HTML (just passed into the 'Markup' Param):
And got a clickable Link in my PDF Viewer ( I used 'Foxit' : which [after confirming I wished to launch the link ] launched a browser and navigated to the link).
PDF attached for reference.