cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

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

Display a pdf of a pdf

Highlighted

Display a pdf of a pdf

Explorer | Level 3

I can use 'filesGetPreview" to view a pdf of .csv, .doc, .ai etc but how do I actually get a pdf of a pdf?? 

The "filesGetThumbnail" only returns a tiny image of a pdf or image. Is there a better way to view a pdf?

Or in other words, how is one supposed to view a file within a browser without downloading it locally?

 

Thank you!

3 Replies 3
Highlighted

Re: Display a pdf of a pdf

Dropboxer

If the file is a PDF to begin with, you can use filesDownload to retrieve the original file data.

Exactly what you do with the data is up to you. Downloading to the local filesystem is not required. You may want to pass the file data to some PDF viewer, for instance. 

Highlighted

Re: Display a pdf of a pdf

Explorer | Level 3

I can retrieve the file but I can't load it into a pdf viewer using javascript. The pdf previewer is a small thumbnail that isn't useful.

How would one do this without first saving it to a server or saving it locally? I've tried react-pdf and other libraries but they can't render a blob.

For privacy reasons I don't want to render users files on a server, I just would like them to be able to view them in a JS webapp.

Thanks!

Highlighted

Re: Display a pdf of a pdf

Dropboxer

It sounds like you're able to retrieve the file data from the Dropbox API, and are now trying to use that file data client-side. The download-style methods, such filesDownload, yield a file blob of the file data. What you do with that is up to you.

Unfortunately, I'm afraid I can't recommend or endorse any particular third party library for displaying data like this, nor can I offer support for any third party method or code. You may be better served by the support community or documentation for any third party library you're trying to use, or a general web development forum.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?