Sign in to follow this  
Followers 0

[Solved] IE + PDF - saving PDF without opening file save dialog

10 posts in this topic

Posted (edited)

I manualy open this pdf in InternetExplorer

http://michaelo.pl/test_pdf/test.pdf

how to connect to this opened PDF using acrobat reader COM object

and how to save that PDF without opening file save dialog

Edited by mlipok

Share this post


Link to post
Share on other sites



Posted

I need something like

_IEAttach

__IEControlGetObjFromHWND

but I don't need attach to IE object

I need attach to AcroPDF.PDF.1 object --> opened pdf document

normaly opened in Acrobat Reader

and

opened in IE

Share this post


Link to post
Share on other sites

Posted

You may be able to get a reference to it with ObjGet

Dale

Share this post


Link to post
Share on other sites

Posted

Why not just get the address from IE and download the file yourself?

Share this post


Link to post
Share on other sites

Posted

DaleHohm

THX

I check it

Richard Robertson

this is not that simple

adress

http://michaelo.pl/test_pdf/test.pdf

is only for example

I have problem with pdf which are opened in IE but url is diffrent than pdf file name

Share this post


Link to post
Share on other sites

Posted

small example

#include <ie.au3>
Local $oInternet = _IECreate()
$oInternet.Navigate("http://michaelo.pl/test_pdf/test.pdf") ; Opening a web page that contains a form
MsgBox(0,'','')
;_IELoadWait($oInternet)
;Sleep(4000) ; Give the page time to load
Local $oDoc = $oInternet.document ; Example object to test
;Local $oForm = $oDoc.forms(0) ; Example object to test
MsgBox(0, "", "Interface name of $oInternet is: " & ObjName($oInternet) & @CRLF & _
  "Object name of $oInternet is:    " & ObjName($oInternet, 2) & @CRLF & _
  "Interface name of $oDoc is:    " & ObjName($oDoc) & @CRLF & _
  "Object name of $oDoc is:      " & ObjName($oDoc, 2) & @CRLF  )

Share this post


Link to post
Share on other sites

Posted

Are you trying to manipulate a PDF form? I've been down that road -- unfortunately what I found is that the COM interface from Adobe applies only to forms opened in Acrobat running in a local instance. The control hosted in a browser is different and they do not supply a COM interface to it (I opened a support case with Adobe about this and they first told me all I needed was Acrobat Pro, but later admitted that it could not be done).

Dale

Share this post


Link to post
Share on other sites

Posted (edited)

THX

DaleHohm

you have right

but i still think how to easy save opened PDF and I have an idea

before I open IE

I want to flush

@UserProfileDir & "Local settingTemporary Internet FilesContent.IE5"

its easy

PDF which I taken from the Web is always named "'aram.nkw*.pdf'"

what I must to do is : analyse directory structure for finding file "'aram.nkw*.pdf'"

but maybe there is a easy way ?

QUESTION:

how I can take a file name (or file location) from PDF document opened in IE

Edited by mlipok

Share this post


Link to post
Share on other sites

Posted

;)

I just found a solution

It's easy

very easy and i think "How I can't get the solution before"

When I use AutoIT v3 Window Info

then in "Visible Text" now I see there is full path to the localy stored file

Pasek poleceń

Pasek poleceń Ulubione

LinksBand

Pasek ulubionych

Dodaj do paska ulubionych

ITBarHost

Pasek menu

100%

100%

Wyszukiwarka Google

Wyszukiwarka Google

Zaznaczenie na stronie

Zaznaczenie na stronie

http://michaelo.pl/test_pdf/test.pdf - Windows Internet Explorer

Gotowe

C:\Documents and Settings\u1\Ustawienia lokalne\Temporary Internet Files\Content.IE5\R4RX6L06\test[1].pdf - Adobe Reader

AVToolBarHostView

AVTableContainerView

AVTabStripView

AVSplitterView

AVSplitationPageView

AVSplitterView

AVScrolledPageView

AVScrollView

AVTableContainerView

8,27 x 11,70 cale

AVPageView

AVToolBarEasel

AVToolBarEasel

AVToolBarEasel

AVToolBarEasel

AVToolBarEasel

113%

1

Share this post


Link to post
Share on other sites

Posted (edited)

$string = WinGetText('http://michaelo.pl/test_pdf/test.pdf - Windows Internet Explorer', 'AVToolBarHostView')
StringRegExp($string,'(?i).*Temporary Internet Files.*.pdf',3)

Edited by mlipok

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.