Code: Select all
Dim pdfobj As Object
Dim objarray As Variant
Set pdfobj = CreateObject("PDFCreactiveX.PDFCreactiveX")
pdfobj.SetLicenseKey key, lisence
pdfobj.Open "TestIn.pdf", ""
pdfobj.CurrentPage = 1
objarray = pdfobj.ObjectAttribute("Pages[1]", "Objects")
For Each obj In objarray
If obj.Attribute("ObjectType") = 6 Then
If obj.Attribute("Name") = "acField1" Then
obj.Attribute("Text") = "This is a test message"
End If
End If
Next
pdfobj.Save "TestOut.pdf", 0
MsgBox "Done"
Set pdfobj = Nothing
Code: Select all
long r = 0;
tagVARIANT objarray;
IPDFCreactiveX pdfobj;
COleException *pException = NULL;
LPCTSTR company = "Us";
LPCTSTR key = "MyKeyNUmber";
pdfobj.CreateDispatch("PDFCreactiveX.PDFCreactiveX", pException);
pdfobj.SetLicenseKey(company, key);
r = pdfobj.Open("TestIn.pdf","");
pdfobj.SetCurrentPage(1);
objarray = pdfobj.GetObjectAttribute("Pages[1]", "Objects");
This is where I am not sure how to retrieve the values from the tagVARIANT type.
Thanks for any suggestions.
Code: Select all