Link to a specific page on a PDF

Hi, I hope you are all well!

I am designing a website that will have links to poems and writings in ebooks (or PDFs), is it possible to have a link that jumps right to a specific page, Adobe gives an example adding the following:

Blockquote

Open a PDF file to a specific page

To target an HTML link to a specific page in a PDF file, add #page=[ page number ] to the end of the link’s URL.

For example, this HTML tag opens page 4 of a PDF file named myfile.pdf:

Note: If you use UNC server locations (\servername\folder) in a link, set the link to open to a set destination using the procedure in the following section. If you use URLs containing local hard drive addresses (c:\folder), you cannot link to page numbers or set destinations. With Adobe Acrobat 7.0 products, a link to a page number works only if you use HTTP or HTTPS locations. UNC server locations will only work if you use the set destinations method outlined in the following section of this document.

Blockquote

Can this be done in Sparkle?

Yes, it can be done in Sparkle. Just remember to add the url extension without the square brackets - just the page number.

I guess in style, on click, in the drop down menu I will need to select link to external link and then input the link where my pdf is stored? (as you can see I am a newbie!)

@silviangelica, I just had a quick look and the first thing that stood out that the user has to have is Adobe Reader onboard or as a plugin to the browser being used… so the big one is that this is going to cause you more headaches than what it is worth because the majority of modern browsers nowadays have a built in PDF reader and doesn’t need Adobe Reader… In fact Adobe Reader isn’t that popular anymore, and this is even more the case on tablet and mobile.

Also if the pdf (say on mobile) isn’t optimised for mobile then it is going to be a bad experience for the user so I’m thinking a rethink is needed.

You can have a link going to an anchor point where you have an excerpt from the poem and if they love it they have the option to download the pdf unless you are looking to monetise it.

Hi @silviangelica, just to clear things up.

The #page=number syntax on the URL is not directly supported by Sparkle. Also like @FlaminFig says, there’s no guarantee that a PDF reader will support it (but as a single data point, I did a quick check and Safari’s PDF viewer on Catalina does).

However like @francbrowne says, it is possible to achieve that. It will be a bit more work than using Sparkle’s built-in “file upload” support.

Once you have uploaded the PDF to your web host, using an FTP app or the web host file manager. After upload the PDF will have an address such as “http://yourdomain.com/folder/document.pdf”. That’s the address that you will take, append the #page=3 (for example), and enter in an external link in Sparkle.

This is correct, The pdf has to be hosted before this option can work. Most browsers will open the PDF in a new widow and direct to the appropriate page. This is why it is best to upload the PDF to your server before adding anything to your sparkle project. You then use the URL option to point to the PDF online. You should then be able to test in preview mode on a number of different browsers to make sure it all works. I don’t think there is a need for users to have acrobat reader installed, as most web-browsers are independent of any PDF application a user may have installed on their computer.