Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

Save PDF in AxSHDocVw.AxWebBrowser

$
0
0

In my VB 2003 app, the browser control is AxSHDocVw.AxWebBrowser. The code checks to see if the incoming file is a pdf file.

 

If TypeOf WebDisplay.Document Is AcroPDFLib.IAcroAXDocShim

 

If the file is a AcroPDFLib.IAcroAXDocShim then I want to "save as" to a local file. C:\Test.pdf

 

What is the code to do this?

 

I've tried to interface CType(WebDisplay.Document, AcroPDFLib.IAcroAXDocShim).src but that returns the web page URL. I want to save the pdf file.

 

I also tried using execCommand.

 

                            Dim strArray(3) As String

                            strArray(0) = "SaveAs"

                            strArray(1) = 1

                            strArray(3) = "C:\test.pdf"

                            CType(WebDisplay.Document, AcroPDFLib.IAcroAXDocShim).execCommand(strArray)

 

But I get a marshal error, excessively long string.

 

I have read Adobe's "Developing Applications Using Interapplication Communication" and "Interapplication Communication API Reference", didn't see anything relevant.


Viewing all articles
Browse latest Browse all 12130

Trending Articles



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