L
LN Mike
I put your code in, and it returns the URL of the web page not the URL of the
PDF file.
Returns "… /doc1/038110817935"
I want "… /cgi-bin/show_temp.pl?file=pdf44974838787197&type=application/pdf"
This is a challenging problem to say the least. I searched on Adobe site,
Adobe forms and Google didn't find anything relevant in any of those oceans.
I posted a new question on Adobe forms, I will keep this tread updated with
any helpful info. It might be a few days.
PDF file.
Returns "… /doc1/038110817935"
I want "… /cgi-bin/show_temp.pl?file=pdf44974838787197&type=application/pdf"
This is a challenging problem to say the least. I searched on Adobe site,
Adobe forms and Google didn't find anything relevant in any of those oceans.
I posted a new question on Adobe forms, I will keep this tread updated with
any helpful info. It might be a few days.
"Jie Wang [MSFT]" said:Hi,
I've found another way to get the URL of the PDF file currently being
displayed "full screen" in the web browser control.
Actually, when the PDF document is displayed "full screen" (or shall we say
full control) in the web browser control, the Document property actually
returns an IAcroAxDocShim interface instead of an HTML DOM interface. This
matches the error description in your second post.
So all we need to do is check the type of the Document property and see if
it is IAcroAxDocShim, we can call src property on that interface and get
the URL of the PDF file.
The code looks like this (suppose I have a WebBrowser control named
AxWebBrowser1):
If (TypeOf AxWebBrowser1.Document Is AcroPDFLib.IAcroAXDocShim) Then
' this is a full screen PDF file
Dim pdfSrc As String
pdfSrc = CType(AxWebBrowser1.Document, AcroPDFLib.IAcroAXDocShim).src
Else
' this is a normal HTML page, process the page.
End If
To access the IAcroAxDocShim interface, you need to add a COM reference to
your project, named "Adobe Acrobat Browser Control Type Library 1.0".
What I'm not sure is whether or not we can download the file even we got
the URL in some cases - like if the page request requires an authenticated
session, this approach may still fail. I tried to save the PDF file via the
IAcroAXDocShim, but failed to find a way to do so. This control is made by
Adobe and I was not able to find a document of how to use it from their
website.
Anyway, please let me know if the IAcroAXDocShim can help you get the URL
first. Then we'll think of a way to get the file via the URL. You can also
try Adobe's online forum to ask questions related to the IAcroAXDocShim
interface to get more information.
Best regards,
Jie Wang ([email protected], remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business days is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.