How to mimic "licensed features" as in EU Editor SOLVED
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.
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.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
How to mimic "licensed features" as in EU Editor
Hi support,
In EU Editor (without license) if some features are used, like "flatten comments", the info bar will display the "licensed features used ... demo stamps placed.. if saved...".
How would I go about adding something like "licensed features" using the SDK?
Say I have defined some actions and I have IPXV_Document::OperationHistory.AddNew (or [Begin|End]Macro) for each. Some of those actions are "special" and if they were used I'd like to disable saving of the document.
My idea:
- Before (any type of) save operation is initiated, I'll somehow check if "special" actions were used and cancel the save (via events).
- How to lookup IPXV_Document::OperationHistory to see if it contains my "special" action(s)? The AddNew methods accepts nFlags parameter - so maybe I could use it to store something that would mark the item as "special" - however I do not see how to read this from IOperationHistoryItem.
- Is there a limit to OperationHistory items? As if the above makes sense, I need to ensure the following will not happen: my special action executed, then a series of standard actions, and as a result my special action is lost in OperationHistory due to, and I guess, MaxUsedMemSize.
Also: how can I check if some of the standard features, like "flatten comments" was executed (and not undone) on a document?
Finally: how can I add my own message (type) to the document info bar? If my special features are used I'd like the info bar to display my custom message (like it does for licensed features in EU Editor).
p.s.
I think I've found a bug in the EU Editor related to "licensed options" - if "Bookmark Every Nth page" is executed, the protected feature warning will appear, but the info bar will not display the warning nor will the demo stamp be placed upon save.
-žarko
In EU Editor (without license) if some features are used, like "flatten comments", the info bar will display the "licensed features used ... demo stamps placed.. if saved...".
How would I go about adding something like "licensed features" using the SDK?
Say I have defined some actions and I have IPXV_Document::OperationHistory.AddNew (or [Begin|End]Macro) for each. Some of those actions are "special" and if they were used I'd like to disable saving of the document.
My idea:
- Before (any type of) save operation is initiated, I'll somehow check if "special" actions were used and cancel the save (via events).
- How to lookup IPXV_Document::OperationHistory to see if it contains my "special" action(s)? The AddNew methods accepts nFlags parameter - so maybe I could use it to store something that would mark the item as "special" - however I do not see how to read this from IOperationHistoryItem.
- Is there a limit to OperationHistory items? As if the above makes sense, I need to ensure the following will not happen: my special action executed, then a series of standard actions, and as a result my special action is lost in OperationHistory due to, and I guess, MaxUsedMemSize.
Also: how can I check if some of the standard features, like "flatten comments" was executed (and not undone) on a document?
Finally: how can I add my own message (type) to the document info bar? If my special features are used I'd like the info bar to display my custom message (like it does for licensed features in EU Editor).
p.s.
I think I've found a bug in the EU Editor related to "licensed options" - if "Bookmark Every Nth page" is executed, the protected feature warning will appear, but the info bar will not display the warning nor will the demo stamp be placed upon save.
-žarko
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: How to mimic "licensed features" as in EU Editor
Hi support,
Any comments here?
At least this:
Any comments here?
At least this:
-žarkohow can I add my own message (type) to the document info bar? If my special features are used I'd like the info bar to display my custom message (like it does for licensed features in EU Editor).
- Paul - Tracker Supp
- Site Admin
- Posts: 6900
- Joined: Wed Mar 25, 2009 10:37 pm
- Location: Chemainus, Canada
- Contact:
Re: How to mimic "licensed features" as in EU Editor
Hi Zarko,
sorry for the delayed response.
Can you email this question to support@pdf-xchange.com and pass along with the email your license details please?
sorry for the delayed response.
Can you email this question to support@pdf-xchange.com and pass along with the email your license details please?
Best regards
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: How to mimic "licensed features" as in EU Editor
Hi Paul,
Tx. Done.
-ž
Tx. Done.
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: How to mimic "licensed features" as in EU Editor
Hello žarko,
The IPXV_Document::InfoBar property allows you to obtain the IPXV_DocInfoBar interface. From there, you can modify it to your liking and also hide/show it.
Cheers,
Alex
The IPXV_Document::InfoBar property allows you to obtain the IPXV_DocInfoBar interface. From there, you can modify it to your liking and also hide/show it.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: How to mimic "licensed features" as in EU Editor
Hi Alex,
Yes, that's it, great, thanks.
Btw, couple of questions though:
1. What is nWeight parameter used for in AddSpan?
2. What does AddSpan2 do (seems like nothing)?
3. How to add formatted text (bold) via SetText?
4. When would I use Inst.RegisterDocInfoBarSpan?
-žarko
Yes, that's it, great, thanks.
Btw, couple of questions though:
1. What is nWeight parameter used for in AddSpan?
2. What does AddSpan2 do (seems like nothing)?
3. How to add formatted text (bold) via SetText?
4. When would I use Inst.RegisterDocInfoBarSpan?
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: How to mimic "licensed features" as in EU Editor
Hello žarko,
The AddSpan2 method looks for an already existing span by the ID and then calls the AddSpan method inside if found. It also uses the PXV_DocInfoSpanFlags as an additional argument.
The weight of the span is used to find the insert position of the span in the Span List - this will also be used to prioritize one span over another. For example, the maximum weight right now is 800. Then the values like 700, 600 etc are used.
Can you give me an example on one of the spans with bold text that you have in mind?
The perfect place would be the e.app.initialized event from what I see.
Cheers,
Alex
The AddSpan2 method looks for an already existing span by the ID and then calls the AddSpan method inside if found. It also uses the PXV_DocInfoSpanFlags as an additional argument.
The weight of the span is used to find the insert position of the span in the Span List - this will also be used to prioritize one span over another. For example, the maximum weight right now is 800. Then the values like 700, 600 etc are used.
Can you give me an example on one of the spans with bold text that you have in mind?
The perfect place would be the e.app.initialized event from what I see.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: How to mimic "licensed features" as in EU Editor
Hi Alex,
Thanks.
Regarding "Inst.RegisterDocInfoBarSpan" - I meant why/when would I need to use it (not where in code).
Here's one bold section:
-ž
Thanks.
Regarding "Inst.RegisterDocInfoBarSpan" - I meant why/when would I need to use it (not where in code).
Here's one bold section:
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: How to mimic "licensed features" as in EU Editor SOLVED
Hello zarkogajic,
Simply give it a string with <b> tag, for example:
"This document complies with the <b>%1</b> standard"
Better to register your custom spans so that it will smoothly work with other DocSpan logic.
Cheers,
Alex
Simply give it a string with <b> tag, for example:
"This document complies with the <b>%1</b> standard"
Better to register your custom spans so that it will smoothly work with other DocSpan logic.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: How to mimic "licensed features" as in EU Editor
Great, thanks.
-ž
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: How to mimic "licensed features" as in EU Editor
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ