Hi,
I want to automatically open the attachment pane when the pdf has attachments, and close the pane if the document has no attachments.
I can detect the what document is showed with the e.activeDocChanged event.
The problem is determining if the active doc has attachments. I checked the online software sdk page but could not find anything.
How can I detect if the active doc has attachments?
Regards
Eric
auto open/close attachment pane
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: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: auto open/close attachment pane
Hello Eric,
The source for the attachments in the Attachments View can be ether the EmbeddedFiles Tree or the annotations on pages. You can look here, how to get to the Tree:
https://sdkhelp.pdf-xchange.com/vie ... ments_edit
As for the attachments on pages, you should look for the FileAttachment annotations.
Cheers,
Alex
The source for the attachments in the Attachments View can be ether the EmbeddedFiles Tree or the annotations on pages. You can look here, how to get to the Tree:
https://sdkhelp.pdf-xchange.com/vie ... ments_edit
As for the attachments on pages, you should look for the FileAttachment annotations.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 130
- Joined: Tue May 03, 2016 1:11 pm
Re: auto open/close attachment pane
Hi,
Yep thats it.
Part one.
Part two will follow soon
Regards
Eric
Yep thats it.
Part one.
Code: Select all
PDFXEdit.IPXC_NameTree Tree = doc.CoreDoc.GetNameTree("EmbeddedFiles");
uint nAttachmentsCount = Tree.Count;
if (nAttachmentsCount > 0)
{
ShowPane(IDS.attachmentsView, true);
}
else
{
ShowPane(IDS.attachmentsView, false);
}
Regards
Eric
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: auto open/close attachment pane
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ