op.document.addWatermark hanging  SOLVED

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Paul - Tracker Supp, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
thomasjcgm
User
Posts: 2
Joined: Thu Dec 10, 2020 9:20 am

op.document.addWatermark hanging

Post by thomasjcgm » Wed Jan 13, 2021 10:15 am

I have a PDF with some form fields and other things on it which the end-user gets filled in from a data source.

The source filling is done using op.fields.modify operation (and op.Do) in a loop for the necessary fields.
I.e. (pseudo code, using a quite obscure language so will save you the language details)
opId = Str2ID'op.field.modify'
For each data source field name
op = CreateOp opId
...setting op.Params..
op.Do
End for each

When the source of the data is in "draft" I add a watermark stamp across the page according to op.document.addWatermarks (using a copy of code from example there):

https://sdkhelp.tracker-software.com/view/PXV:op_document_addWatermarks



The problem is I have this intermittent problem of the process hanging in various places after running this code to add watermark. Removing the code makes things behave nicely. It does not hang in Do()-function but rather just when it is in "idle" or doing events. Sometimes it hangs during closing/removal of the PXV_Control and sometimes just when doing nothing special with the PXV_Control still open. My app opens and closes these PXV_Controls many times during lifetime but this can occur on first iteration or after 10 or after 20 tries.

As the event-loop in the app is managed by the VM run (Dyalog APL) I have no idea what is actually happening here unfortunately but as indicated there is something bad going on after adding watermark using op.document.addWatermarks which otherwise does not happen.

Any tips on how to proceed or is there any other way of adding this functionality which is not prone to cause locking/hanging problems?

User avatar
Sasha - Tracker Dev Team
User
Posts: 5198
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: op.document.addWatermark hanging  SOLVED

Post by Sasha - Tracker Dev Team » Wed Jan 13, 2021 12:36 pm

Hello thomasjcgm,

We are planning to release V9 soon. As far as I remember, several hanging problems reported are already fixed when trying to reproduce there. This should be out in a week or so, if all goes well.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Post Reply