Printing PDF with dynamic page titles

I love Axure because it let’s me be lazy, however I may have gone too far this time. I used a text field to generate all my page titles, which works awesome on a prototype, however, when I go to print as a PDF all I have is a box that says page title. :frowning:

I have 43 pages so I’d rather not have to publish a prototype and print each as a PDF individually.

Any ideas?

I wish we could bump up this post. We’re trying to transition from Omnigraffle to Axure but there doesn’t seem to be any way to export dynamic text to a PDF. We have large sites and need ways to speed up our workflow.

Ideally, we’d be able to export (as PDF) dynamic headers (page titles) and footers and create some sort of dynamic created on / edited on text in the footers.

Hey sawtooth,

It sounds like you’re using something like OnPageLoad to set text on particular widgets in the browser, and would like for that browser-set text to be reflected in the printed PDF–is that right? If so, then you may like the snapshot widget in the 8.0 beta. The snapshot widget will allow you to reference the page that your widget is on and apply specific actions to that page or to the widgets. For example, if on your “Home” page you have a blank rectangle widget that has its text set to “Hello” by the page’s OnPageLoad event, you could show this by placing a snapshot widget on another page (e.g., “Page 1”) and pointing the snapshot to “Home”. You could then fire the “Home” page’s OnPageLoad event in the snapshot widget by using the “Applied Actions” option for the snapshot. This will result in you having a snapshot of the page with the OnPageLoad event fired, which will allow you to print a copy of your prototype with that event fired.

Would that do what you’re looking for? If you’re interested in reading more about snapshots, feel free to take a look at the link below:

Axure Blog - Learn Axure RP 8 Beta: Snapshot Widget

Repeaters are the only way I found to dynamically run script within the Axure Software without preview. So here’s my trick:

1- Create a master for your Page Title. Use a simple box and don’t forget to name your Widgets (like «TXT_PageTitle»)
2- Insert a repeater in one of your page
3- Open the repeater and insert your master in your repeater
4- Replace the reference to the repeater’s box «OnItemLoad» by the widget in your master… «SetText on (Your Master)/TXT_PageTitle equals to…» and remove the original repeater’s box
5- Change the value «…equals to “[[item.Column1]]”» by «…equals to “Any prefix that you want to add + [[PageName]]”
6- Remove any rows that are useless EXCEPT the first row.
7- Copy that Repeater in any page that you need to title dynamically, it will appear live and then so when you print!

That’s it!

Note: I use to do that trick too for titles within a page when I want to customize titles without using Headers. It makes changes through all your pages easier and let the master text editable through the repeater’s data cell.

1 Like

@antoine
I couldn’t seem to get this to work. as I tried the repeater workaround in both a page and master, and tried a variety of similar configurations.

Not sure if they fixed this (as it seems like a bug), as I was unable to replicate your workaround.

Hi Josh,

One thing that may not be clear enough is that you have to copy/paste the repeater from page to page and not directly from the master. To work properly, the repeater must be implemented within a page otherwise it will be labeled with the master’s page name. The master is there to customize more the look of the header for complex header but it could be a simple box with a dedicated widget style.

I prepared a file to exemplify both… I hope that it is what your were looking for! :slight_smile:

Dynamic-PageName.rp (59.0 KB)

@antoine
I discovered what my issue was.

I did not realize that for your workaround to work, the repeater containing [[PageName]] cannot be contained within a dynamic panel.

As soon as I put your examples in a dynamic panel it reads the panel state as the [[PageName]].

I didn’t realize this is how [[PageName]] worked, probably because it’s called “PageName” and not “ParentName” or something similar.

*edit: clarifying issue

That’s interesting indeed… [[PageName]] is probably more convenient for beginners but [[ParentName]] would make more sense, unless Dynamic Panels to be considered “SubPages”!?

Thanks for sharing!