Help needed with procedure to navigate to a specific page in pdf

Based on this pdf macro by telumire, I tried to create a procedure which does the same , that is to navigate to the specified page in a pdf tiddler using a button.

There are two issues that I am facing

  1. If the pdf tiddler is not already present in the storyriver, it doesn’t open inspite of adding the action navigate widget to the actions parameter of the button widget
  2. If the pdf tiddler is already present in the storyriver, inspite to pressing the buttons to navigate to different pages of the pdf, the pdf will stay open in the already loaded page. The new page will load only after the pdf tiddler is edited and closed,

Can someone solve this issue. Here is the demo wiki.

That looks like a bug. You can change the actions to these:

<$action-setfield $tiddler=<<tid>> _canonical_uri=<<pdf-url>> />
<$action-navigate $to=<<tid>> $scroll="yes" />
<$action-setfield $tiddler=<<tid>> text=<<pdf-url>> />
</$let>
2 Likes

This is working. Thank you @buggyj . Why do you call it a bug if it’s working with the code you gave

In my opinion modifying the _canonical_uri should make the pdf redraw. Changing the text field when using the _canonical_uri should not be necessary.

Removing the redraw if tiddler fields are changed, was implemented because users complained about it all the time, when their text inputs lost focus with every character typed.

I do not know the exact TW version but you can test the old behaviour with

Eg: v5.1.23

Yes, but in the case of _canonical_uri it replaces the function of the text field, so I would expect it to cause a redraw.

Thanks @buggyj could you point to the code/commit in question?