cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dropbox Rendering Specific Pages of PDF in HTML

Dropbox Rendering Specific Pages of PDF in HTML

vcha
Explorer | Level 3
Go to solution

I am trying to display a specific PDF page on my webpage.

When I set src to (below), it displays the whole pdf.

src="https://www.dropbox.com/example.pdf?raw=1

 When I add #page=3 (example below), it still display the whole pdf.

src="https://www.dropbox.com/example.pdf?raw=1#page=3

Is it possible to navigate/display a specific page of the PDF using Dropbox?

1 Accepted Solution

Accepted Solutions

Здравко
Legendary | Level 20
Go to solution

@vcha wrote:

...

 When I add #page=3 (example below), it still display the whole pdf.

...


Hi @vcha,

First of all, the whole pdf gonna show always! If you want only particular page to show up, you need to edit the pdf on fly and strip all other pages. Adding particular page as a anchor just navigates to that page, but doesn't restrict which part of the pdf to be shown.

After that, take in mind that Dropbox shared link doesn't point to the referred file directly, but redirect to there. During this redirection any anchor in the former link gets stripped and that's why pdf files will always show from the first page. You have to scroll to desired page yourself after the document gets loaded.

Hope this helps.

View solution in original post

5 Replies 5

Здравко
Legendary | Level 20
Go to solution

@vcha wrote:

...

 When I add #page=3 (example below), it still display the whole pdf.

...


Hi @vcha,

First of all, the whole pdf gonna show always! If you want only particular page to show up, you need to edit the pdf on fly and strip all other pages. Adding particular page as a anchor just navigates to that page, but doesn't restrict which part of the pdf to be shown.

After that, take in mind that Dropbox shared link doesn't point to the referred file directly, but redirect to there. During this redirection any anchor in the former link gets stripped and that's why pdf files will always show from the first page. You have to scroll to desired page yourself after the document gets loaded.

Hope this helps.

vcha
Explorer | Level 3
Go to solution

Thanks for the answer

Здравко
Legendary | Level 20
Go to solution

@Greg-DB, I believe adding a new feature for anchor transferring would improve user experience related to parametrize document view (for instance the case described by @vcha).

Would be fine a link parameter caring anchor content to be available (for instance a parameter named "anchor" passed together with "raw" parameter). This parameter value can represent the final anchor and can be passed encoded either base64 or URL. 😉 Parameters get passed to the server (the anchor does not) and can be added to the final redirection as actual anchor.

Greg-DB
Dropbox Staff
Go to solution

Thanks for the feedback! I'll send this along as a feature request.

aliseid
New member | Level 2
Go to solution
thank
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    aliseid New member | Level 2
  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Здравко Legendary | Level 20
  • User avatar
    vcha Explorer | Level 3
What do Dropbox user levels mean?