Can we access file from google drive

Hey,

I have files in my google drive. Can I access the google drive file in Pdftron directly?

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi @BossRizwan

Yes, you should be able to. WebViewer can handle file opening from multiple sources: https://www.pdftron.com/documentation/web/guides/basics/open/url/.

You might need to pass an additional auth-token: https://www.pdftron.com/documentation/web/guides/basics/open/url/#additional-options.

I did a little digging around, and you may need to make the call to the Google Drive API:

There is an example in there of how to make a GET call to get the file’s contents; you will need to pass certain headers for auth, as well as include your API Key in the URL.

curl \
  'https://www.googleapis.com/drive/v3/files/[FILEID]?key=[YOUR_API_KEY]' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --compressed

Regards
Armando

Thanks alot, dear, its work fine

Dear respected,

I have issue with image file,

Issue is that, actually i have make some change on image. and save the annotation, the image file change into pdf, how i can get image file, ?

Hi @BossRizwan,

Once you open the image in WebViewer, it gets converted to a PDF. If you wish to then convert this PDF back to an image you can use on of our back-end APIs:

Regards
Armando