Help needed with conversion to Ribbon UI  SOLVED

PDF-XChange Editor SDK for Developers

Moderators: Tracker Support, TrackerSupp-Daniel, 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.
Post Reply
prime clinical systems
User
Posts: 184
Joined: Sun Aug 05, 2012 5:20 pm

Help needed with conversion to Ribbon UI

Post by prime clinical systems » Wed Apr 24, 2019 3:06 pm

Hi this code works fine still in V8 to popup the cmd.document.signatures.placesign with classic mode, but throws error in ribbon mode, not sure how to find this now as I moved it to the Home Tab:

Dim cmdBar As PDFXEditCtl.IUIX_CmdBar
Dim nFlatIndex As Long
Dim cmdDoc As PDFXEditCtl.IUIX_CmdItem
Set cmdBar = Me.PDF.Inst.ActiveMainFrm.View.MenuBar
nFlatIndex = cmdBar.FlatFindFirstItemByCmdName("cmd.document") : this fails now

Set cmdDoc = cmdBar.FlatGetItem(nFlatIndex)
Dim cmdDocMenu As PDFXEditCtl.IUIX_CmdMenu
Set cmdDocMenu = cmdDoc.SubMenu
Dim nMenuIndex As Long
nMenuIndex = cmdDocMenu.FindFirstItemByCmdName("cmd.document.signatures.placesign")
Dim cmdSigSubMenu As PDFXEditCtl.IUIX_CmdMenu
If nMenuIndex = -1 Then
Exit Sub
End If
Set cmdSigSubMenu = cmdDocMenu.Item(nMenuIndex)
Dim IUIXobj As PDFXEditCtl.IUIX_Obj
Set IUIXobj = Me.PDF.Inst.ActiveMainView.Obj
Dim pPos As PDFXEditCtl.tagRECT
pPos.left = 200
pPos.bottom = 200
Call Me.p_uiInst.CmdManager.ShowPopupMenu(IUIXobj, cmdSigSubMenu, pPos)

Tried this but does not work:
Call Me.p_uiInst.CmdManager.ExecCmd(Me.PDF.Inst.Str2ID("cmd.document.signatures.placesign"))

Thanks.

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

Re: Help needed with conversion to Ribbon UI

Post by Sasha - Tracker Dev Team » Thu Apr 25, 2019 12:15 pm

Hello prime clinical systems,

Try using the cmd.document.signatures.sign command.

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

prime clinical systems
User
Posts: 184
Joined: Sun Aug 05, 2012 5:20 pm

Re: Help needed with conversion to Ribbon UI

Post by prime clinical systems » Thu Apr 25, 2019 2:37 pm

Hi Alex, this command is for placing a digital signature.. I want to call the Signatures and Initials popup, as before, just not sure where to start the search since the document menu does not exist in Ribbon UI. Thanks

prime clinical systems
User
Posts: 184
Joined: Sun Aug 05, 2012 5:20 pm

Re: Help needed with conversion to Ribbon UI  SOLVED

Post by prime clinical systems » Sat Apr 27, 2019 3:13 pm

You can ignore this now, I solved by moving the signatures and initials to the main command bar, so no longer need to pop it up.

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

Re: Help needed with conversion to Ribbon UI

Post by Sasha - Tracker Dev Team » Mon Apr 29, 2019 7:19 am

Hello prime clinical systems,

Glad you had it solved.

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

Post Reply