Adding File Attachments

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Adding File Attachments

Post by docu-track99 »

In version 2.0.42.4 is there a way to programmatically add file attachments to pdfs? If not then how can we make the file attachments pane invisible?
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Adding File Attachments

Post by Corwin - Tracker Sup »

You can hide attachments pane by using next code:

Code: Select all

Dim iActiveDocID As Long
Call CoPDFXCview1.GetActiveDocument(iActiveDocID)
If iActiveDocID > 0 Then
    CoPDFXCview1.SetProperty "Documents[#" & iActiveDocID & "].View.Panes[#33205].Visible", 1
End If
For now we don’t have any functions to add attachment programmatically, but you can execute "AddFileAttachment" command:

Code: Select all

Dim vDataOut As Variant
Call CoPDFXCview1.DoVerb("", "ExecuteCommand", "AddFileAttachment", vDataOut, 0)
HTH