PDF-XChange - Tracker PDF Viewer - TIFF-XChange - Image-XChange - XMF-XChange - Raster-XChange - Support

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Sean - Tracker, 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.
 
RMan
User
Topic Author
Posts: 149
Joined: Tue Jul 02, 2013 10:06 pm

Easier way to set Watermark Options based on last used settings

Thu Dec 06, 2018 5:59 am

Is there an easy way to retrieve the last used Watermark paramerters and assign it to the Options to create a new watermark?

Also a way to assign the Options to one of the Custom (Saved) Watermark Settings?

This is the function I was looking at using to add the watermarks.
https://sdkhelp.tracker-software.com/vi ... Watermarks

I can find the last used settings from the following
Dim oCab As CoAUX_Cab
Set oCab = AxPXV_Control1.Inst.Settings.Item("Operations.AddWatermark")

It returns a CoAUX_Cab object which I can then iterate through the values and set them to the ICabNode values that the Options needs but it seams like there should be an easier way.

Dim oOptions As PDFXEditCtl.ICabNode
Set oOptions = Op.Params.Root("Options")
 
User avatar
Sasha - Tracker Dev Team
User
Posts: 3701
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Easier way to set Watermark Options based on last used settings

Thu Dec 06, 2018 7:51 am

Hello RMan,

We store the last used options in the:
Set oCab = AxPXV_Control1.Inst.Settings.Item("Operations.AddWatermark")

Then get the Root ICabNode from the oCab - this will have the same structure as the:
Dim oOptions As PDFXEditCtl.ICabNode
Set oOptions = Op.Params.Root("Options")

Then you can just do:
oOptions.Copy(oCab)

or
Op.Params.Root("Options") = oCab.Root


Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
 
RMan
User
Topic Author
Posts: 149
Joined: Tue Jul 02, 2013 10:06 pm

Re: Easier way to set Watermark Options based on last used settings

Thu Dec 06, 2018 12:51 pm

Awesome!!!! Thanks so very much. That makes the code so much cleaner.
 
User avatar
Sasha - Tracker Dev Team
User
Posts: 3701
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Easier way to set Watermark Options based on last used settings

Thu Dec 06, 2018 1:21 pm

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

Who is online

Users browsing this forum: No registered users and 6 guests