Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

PDF report - nav hyperlinks / popup messages

iCFO
9 - Comet

Just about every project that includes a PDF report eventually includes a request to create pop-up messages and assigning navigation hyperlinks to text. Has anyone figured out a way to pull this off within Alteryx?  Manually doing this after export is not an option because often hundreds of reports are generated via Alteryx.

6 REPLIES 6
Nanoq
8 - Asteroid

If you do find an "elegant" solution, let me know, but i did some digging, and as far as i can see, the best bet is probably to use a VBA script after the pdf's are made, that you run via the workflow configuration events. 
It feels like there should be a better way, but it might work at least

danilang
19 - Altair
19 - Altair

Hi @iCFO 

 

To add a hyperlink, use a Report Text tool in Expert Mode and add the anchor in the Text Data

 

danilang_0-1633523987748.png

 

The Render tool outputs this correctly to both HTML and PDF files.  

 

Dan

 

 

  

iCFO
9 - Comet

@danilang I have only seen this approach used for basic external urls... Have you figured out how to use this hyperlink approach to do internal navigation links between pages within a PDF report?

danilang
19 - Altair
19 - Altair

Hi @iCFO 

 

According to this, you need to create destination tags in the pdf and link to those if your using URL notation in the link.  I haven't found a way to create the destination tag in Alteryx though.  You might be able to work around by saving the pdf to a directory where it can be served up by a basic web server.  The same link says that you can add #page=as in <A HREF="http://www.example.com/myfile.pdf#page=4">.  Since the link will be parsed by the web server, the pdf should open to the correct page

 

Dan 

iCFO
9 - Comet

@Nanoq Thanks for the reply. Unfortunately I am almost always generating multiple PDF reports that vary greatly section length and narrative. For example, my current project outputs 250 or so user friendly management reports with logic that adapts to very different scenarios. The same topic sections might be 1 page long on one PDF and 8 pages on another. Do you think it would be possible to dynamically apply an intuitive nav link structure across highly variable documents as a second step within the same workflow?

iCFO
9 - Comet

@danilang I have figured out how to do relative link page navigation  via javascript within a PDF using "this.pageNum = 1;" The full Adobe PDF tags for the code are <</JS(this.pageNum = 1;)/S/JavaScript>>

 

I haven't successfully applied it via the Repot Tool in Expert Mode yet, but it seems promising... I am currently getting this Error: "Exception parse error line: 5 column: 340 element name expected".  Any Ideas? Can PCXML be used to pass javascript as well?

Labels