Save ONLY Custom Properties from Plugin - Acrobat SDK 9

New Here ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

I have a plugin that adds and removes custom properties to and from a PDF.  After my plugin changes the custom properties, I want it to also save the PDF but I only want the custom properties portion of the document to be updated.  The reason is that if the user has edited the PDF but not saved those changed then I don't want to force those changes to be inadvertently saved.  In otherword, I need my changes to custom properties to be separate from the user's changes to the document or pages or other components (unless of course they just do a normal save, or edit properties and save, then it doesn't matter).

Is it possible to save ONLY the Custom Properites of the AVDoc from a plugin from SDK 9?

I can use AVDocDoSave to save the document entirely, and silently, but I'm afraid that will confuse users because it forces them to save their current work without realizing it and they may not have wanted that to happen.

Thanks

TOPICS
Acrobat SDK and JavaScript

Views

140

Likes

translate

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

correct answers 1 Correct Answer

Adobe Community Professional , Mar 22, 2018 Mar 22, 2018
The only way to do that would be to basically undo all the user changes, then redo them after the save. I don't think this is entirely possible.A better strategy would be for the plug-in to save the plug-in property changes (not the PDF) to a persistent storage location.

Likes

translate

Translate

Translate
Most Valuable Participant ,
Mar 22, 2018 Mar 22, 2018

Copy link to clipboard

Copied

This is impossible in practice and in concept.

Likes

translate

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
Adobe Community Professional ,
Mar 22, 2018 Mar 22, 2018

Copy link to clipboard

Copied

The only way to do that would be to basically undo all the user changes, then redo them after the save. I don't think this is entirely possible.

A better strategy would be for the plug-in to save the plug-in property changes (not the PDF) to a persistent storage location.

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

Likes

translate

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