Fill and Sign PDDoc issue.

New Here ,
Jun 11, 2019 Jun 11, 2019

Copy link to clipboard

Copied

Hello,

I'm developing plug-in for Acrobat/Reader(C++) and with recent 19.012.20034 update I start receiving different pointer to PDDoc on PDDocDidSave and PDDocDidClose events which was fork fine until update to latest version.

To clarify:

I'm using a map to store PDDoc pointers on PDDocDidOpen and then I use it to determine which document opened through my procedure.

Should I use PDDocAcquire or it is a bug?

TOPICS
Acrobat SDK and JavaScript

Views

409

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 ,
Jun 11, 2019 Jun 11, 2019

Copy link to clipboard

Copied

Use something else to ID the Docs, such as the DocID or Path. Both are unique to the particular PDF.

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
New Here ,
Jun 21, 2019 Jun 21, 2019

Copy link to clipboard

Copied

Hello, i tried using PDDocGetID but for every document I got id = 16 and also when I perform this call to obtain PDDoc ID DiDSave event fired twice and on second time it just crushed application.

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
Most Valuable Participant ,
Jun 21, 2019 Jun 21, 2019

Copy link to clipboard

Copied

PDDocGetID returns an array. If you say it's returning 16, it sounds as if you are comparing the number of bytes in the array, rather than the array itself.

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
New Here ,
Jun 24, 2019 Jun 24, 2019

Copy link to clipboard

Copied

Thank you for clarification. I was rewrite it.
But Acrobat still constantly crashing when i try to call function through COM object on PDDocDidClose event.

Also i got wrong PDDocID on DidSave event when pressing Fill and Sign but when I got control on PDDocDidClose callback the ids the same and everything goes fine until I want to make some call through COM(This call works fine on simple save (Ctrl+S), when just closing document (Press X on document title)).

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
New Here ,
Jun 25, 2019 Jun 25, 2019

Copy link to clipboard

Copied

The odd thing is that it had been working for three years and now my old code is broken.

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
Most Valuable Participant ,
Jun 25, 2019 Jun 25, 2019

Copy link to clipboard

Copied

Signing inherently saves the file, but perhaps in the latest version it also closes and reopens the file for some reason. May be an enhancement to security, which is always messing us about.

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
Most Valuable Participant ,
Jun 25, 2019 Jun 25, 2019

Copy link to clipboard

Copied

By the way do you also monitor for DocDidClose event? I would expect that to be called, or it's a bug.

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
New Here ,
Jun 25, 2019 Jun 25, 2019

Copy link to clipboard

Copied

Hello,

Test Screen Name

I made a few test and on a simple SaveAs and Close as a result I got the same ids for two documents.

On a simple SaveAs, Save, Close all COM calls works fine.
But when I press on Fill and Sign same behaviour present for PDDocID and as a plus COM calls crushes application.

"By the way do you also monitor for DocDidClose event? I would expect that to be called, or it's a bug."

Yes, i subscribed on this two events and they are called in a row.

BarlaeDC

Hello,

I didn't see DidOpen event because it stops working on DidClose because of COM calls in case of Fill and Sign.

So I remove part of code which was written to obtain PDDocID and left old one which rely on PDDoc pointers with which i can aline with opened documents in Acrobat with my collection.

In case SaveAs I don't see DidOpen event.

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 ,
Jun 25, 2019 Jun 25, 2019

Copy link to clipboard

Copied

HI,

Does the call work ok if you call a 'SaveAs' as the first signature calls a SaveAs (I think) and a SaveAs, closes and reopens the document, which would invalidate the DocID.

Regards

Malcolm

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