• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Saving to Sharepoint with Javascript

Community Beginner ,
Feb 26, 2018 Feb 26, 2018

Copy link to clipboard

Copied

I know that you can save directly from Acrobat to SharePoint manually from the interface...but I'm trying to save to SharePoint (via a trusted function) through JavaScript.

I'm having some issues in that...if I force a connection to SharePoint (intranet) manually my script will succeed.  But if the user logs off and back on and then loses that connection, my script will fail.  I've been working with our network guru and here is a question he is asking.  I have no clue, but any suggestions will be greatly appreciated!!!

Is there any way for a script to access the sharepoint web connector? It seems to pass through authentication without any issues. Currently making webdav conections but it only works if the user already has an open and authenticated connection. If the connection isn't already established it just fails.

Thanks everyone!!!

Karen

TOPICS
Acrobat SDK and JavaScript , Windows

Views

990

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 26, 2018 Feb 26, 2018

Copy link to clipboard

Copied

Hello Karen,

  The doc.SaveAs() function doesn't include any parameters for webDav authentication, so I don't think there is any direct way to make this work on a connection that has not already been established. However, there may be a way to force the connection with another function. I don't know if this will work, and I do not work directly with sharepoint, but the HTTP.NET object does provide for authentication.  Maybe it will work to establish the connection before doing the save.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 27, 2023 Jan 27, 2023

Copy link to clipboard

Copied

Hello Thom:

 

I am interested in saving pdf to Sharepoint folder via javasript. I use a trusted script that saves pdf to local or network folder, but I don't know how to do it on SharePoint folder.

Could you publish any example using HTTP.NET object?  How would be formatted the sharepoint folder url link? This would help me a lot. Thanks for your knowledge.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 27, 2023 Jan 27, 2023

Copy link to clipboard

Copied

LATEST

The HTTP.NET object can't be used from a document script. It can only be used from a trusted folder level script in Acrobat Pro. 

 

I don't know the parameters you'd need to post to a SharePoint folder. There is often more to using a web service than the URL, such as specific header fields, or authorization.  I'm sure SharePoint publishes this info. 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines