Quantcast
Channel: Adobe Community: Message List - Acrobat SDK
Viewing all articles
Browse latest Browse all 10848

How to pass a JS object from VB.NET?

$
0
0

Using Acrobat X Pro, I want to hand plain Javascript objects from VB.NET to Acrobat JS functions.

 

For instance (just a snippet):

 

Dim pdDoc As CAcroPDDoc = CreateObject("AcroExch.PDDoc")

pdDoc.Create()

Dim jsObj As Object = pdDoc.GetJSObject()

Dim newDoc As Object = jsObj.app.openDoc(New With {.bUseConv = 1, .cPath = inputFile})

 

Last line results in a COM exception: HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH)

 

In Perl, this is quite easy, according to http://rodriguezlucha.blogspot.de/2012/09/converting-word-to-pdf-using -adobe.html:

 

my $new_doc = $jso->app->openDoc({

    cPath=>"$input_file",

    bUseConv=>1,

});

 

What is the according syntax in VB.NET?

 

Thank you very much!


Viewing all articles
Browse latest Browse all 10848

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>