Dynamic Stamp Refresh Issue

PDF-XChange Editor SDK for Developers

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

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
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Dynamic Stamp Refresh Issue

Post by jeffp »

I'm having a refresh issue with using the Name property in the Identity options.

I have loaded a dynamic stamp that uses the "Name" item in the Identity Options located on the Edit>Preferences>Identity page.

Here's what I'm seeing.

I set the Name to "Test".
I then close the editor.
I open the editor and insert my dynamic stamp, but the stamp uses my Windows username instead of the value of "Test".
In that same session, I go back and change the Name to "Test1".
I then can insert the dynamic stamp again and now it uses the value of "Test1" instead of my Windows username.

So the Name item seems to save correctly. It just doesn't get used until I adjust and save a new value for Identity Name.

Any thoughts on what I need to do to recreate this?

Is seems to be fine on your Standalone version of the Editor, but not in the SDK.

--Jeff
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8371
Joined: Wed Jan 03, 2018 6:52 pm

Re: Dynamic Stamp Refresh Issue

Post by TrackerSupp-Daniel »

Hello, jeffp

Could I ask you to send us a copy of the stamp file, or the JS in use within the stamp itself, so that we can take a closer look?

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Dynamic Stamp Refresh Issue

Post by jeffp »

Sure. See attached.
dynamic-stamps.zip
(38.26 KiB) Downloaded 79 times
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8371
Joined: Wed Jan 03, 2018 6:52 pm

Re: Dynamic Stamp Refresh Issue

Post by TrackerSupp-Daniel »

Hello, jeffp

I have just spoken with the Dev team on this. It turns out that your SDK application needs to perform the action of saving changes to the stamp file, to whatever location you have defined as the stamp storage folder.
The End user products do this automatically during stamp use, and upon closing the software, to either of two folders (within the install Dir, or %appdata%), but with an SDK product, you need to configure and define the action yourself.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Dynamic Stamp Refresh Issue

Post by jeffp »

Can you give me an example of how to do this with the SDK?

Am I saving changes to the file being stamped by the stamp file? Or the stamp file itself?

I don't completely follow.

--Jeff
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Dynamic Stamp Refresh Issue

Post by Ivan - Tracker Software »

The identity setting is the same as the rest of the other settings need to be saved by your application.
To do that, you have to call IPXV_Inst::SaveUserSettings before your application exit.
For sure, at the start, you have to load these settings via IPXV_Inst::LoadUserSettings.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Dynamic Stamp Refresh Issue

Post by jeffp »

Ok. I got that. I now Save the Identity settings when I exit the app.

But it seems I need to refresh or resave the actual stamps file too.

When I close and reopen, the dynamic stamp always reverts back the default username instead of what's in the Identity name. Do I need to do something as I select the custom dynamic stamp from the stamp list?

--Jeff
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Dynamic Stamp Refresh Issue

Post by Ivan - Tracker Software »

Dynamic stamps may not be 'refreshed' when it is shown in the stamps list, but the calculation is called when you choose a stamp, and the second time calculation is called when you actually place the stamp.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Dynamic Stamp Refresh Issue

Post by jeffp »

I was told above that I needed to save changes to the stamp file in the SDK since the SDK does things differently.

I'm just trying to find out the exact steps I need to take in the SDK for this dynamic stamp to work.

Again, it does update or recalculate to the Name in Identity until I go and modify the Name in Identity. Even if Identity has a Name, when I open the program a new and then load a file and place the stamp, the stamp uses the Windows UserName as the Name even if Identity has a different Name.

Sorry if I'm not understanding something here, but I just can't get it to work in the SDK.

--Jeff
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2351
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Dynamic Stamp Refresh Issue

Post by Vasyl-Tracker Dev Team »

Hi Jeff.

To customize the user name via Identity section in Editor's settings you may:

sett = pdfCtl.Inst.Settings;

sett["Identity.AlwaysUseLoginName"].v = false;
sett["Identity.GetFromAD"].v = false; // to prevent loading user-info from an active domain

sett["Identity.Name"].v = "John Doe";

pdfCtl.Inst.FireAppPrefsChanged(PDFXEdit.PXV_AppPrefsChanges.PXV_AppPrefsChange_Identity); // to notify Editor that Identity settings were changed programmatically

Also, to keep between sessions any changes in settings made programmatically or by the user - you need to use the way we showed in our FullDemo(C#).

HTH.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Dynamic Stamp Refresh Issue

Post by jeffp »

Got it working. Thanks so much.

--Jeff
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17765
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Dynamic Stamp Refresh Issue

Post by Tracker Supp-Stefan »

:)
Post Reply