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

[PDF Embed API] Annotations are not saving for multi users

New Here ,
Sep 20, 2021 Sep 20, 2021

Copy link to clipboard

Copied

Hi, I'm writing a react app where users may add annotations to a pdf which is being hosted in Dropbox. My problem is when there are multiple users accessing the file only one user can save the annotations and the annotations from other users are being ignored. Any ideas? Also, is it possible to show annotations from other users in real time? 

Views

529

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 ,
Sep 21, 2021 Sep 21, 2021

Copy link to clipboard

Copied

It's possible to show annotations from other users but you'd need to build out the back end to manage them. Without such a back end, you won't be able to have multiple users update a PDF with annotations because the PDF on the client isn't synchronizing with the PDF in Dropbox, it's overwriting it... assuming you are saving back to Dropbox using the Save API.

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 ,
Sep 22, 2021 Sep 22, 2021

Copy link to clipboard

Copied

Yes you assumed right. I can do the backend if needed, but not sure what I'm supposed to do. Should I save the annotations in json, save to backend, then load when the user views the pdf? But how do I save it to the pdf? Is it easier to restrict other users when someone is currently annotating the pdf? Thanks so much for your insights.

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 ,
Sep 22, 2021 Sep 22, 2021

Copy link to clipboard

Copied

You're on the right track. If I were building such a solution, I'd never modify the original PDF. My backend would store information about the locations of any PDF files that were under review and have "side-car" files (or data somewhere) that represented the annotations for each user. I'd them have some code on the front end that would detect if a PDF file that got opened was one that had managed annotations and import them on demand for each session saving only the annotation changes and not modifying the underlying PDF. 

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 ,
Sep 22, 2021 Sep 22, 2021

Copy link to clipboard

Copied

LATEST

But how do I embed all the managed annotations into the reviewed pdf in the end? Lastly, I noticed that there's a delay between the client pdf and the pdf saved in Dropbox, say I put some annotations (autosave enabled) then refresh the page - the pdf in Dropbox is updated instantly but the pdf in the client takes a couple of refresh before the updated annotations appear, any idea? Thanks so much!

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
Resources