Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

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


Best Answer mLipok , 01 May 2012 - 07:12 PM

;)
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

Go to the full post


  • Please log in to reply
9 replies to this topic

#1 mLipok

mLipok

    thinking does not hurt, ........ .......... but it takes time

  • Active Members
  • PipPipPipPipPipPip
  • 2,501 posts

Posted 19 April 2012 - 08:36 PM

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, 01 May 2012 - 07:13 PM.

My contribution:
DumpDebugingBestCodingPractice Analyzer * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * NEW 21-09-2014: Debenu PDF Viewer SDK - UDF * Debenu Quick PDF Library - UDF * RTF Printer - UDF * XZip - UDFAcrobat Reader - ActiveX ViewerAppCompatFlags UDF

 

Other useful stuff - click the following Show button:

Spoiler

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute"  Donald Knuth







#2 mLipok

mLipok

    thinking does not hurt, ........ .......... but it takes time

  • Active Members
  • PipPipPipPipPipPip
  • 2,501 posts

Posted 22 April 2012 - 01:19 PM

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

My contribution:
DumpDebugingBestCodingPractice Analyzer * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * NEW 21-09-2014: Debenu PDF Viewer SDK - UDF * Debenu Quick PDF Library - UDF * RTF Printer - UDF * XZip - UDFAcrobat Reader - ActiveX ViewerAppCompatFlags UDF

 

Other useful stuff - click the following Show button:

Spoiler

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute"  Donald Knuth

#3 DaleHohm

DaleHohm

    Think of IE as an API...

  • MVPs
  • 5,981 posts

Posted 23 April 2012 - 12:55 PM

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

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

 

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

 

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y
Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble


#4 Richard Robertson

Richard Robertson

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 10,315 posts

Posted 23 April 2012 - 01:55 PM

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

#5 mLipok

mLipok

    thinking does not hurt, ........ .......... but it takes time

  • Active Members
  • PipPipPipPipPipPip
  • 2,501 posts

Posted 23 April 2012 - 04:13 PM

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

My contribution:
DumpDebugingBestCodingPractice Analyzer * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * NEW 21-09-2014: Debenu PDF Viewer SDK - UDF * Debenu Quick PDF Library - UDF * RTF Printer - UDF * XZip - UDFAcrobat Reader - ActiveX ViewerAppCompatFlags UDF

 

Other useful stuff - click the following Show button:

Spoiler

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute"  Donald Knuth

#6 mLipok

mLipok

    thinking does not hurt, ........ .......... but it takes time

  • Active Members
  • PipPipPipPipPipPip
  • 2,501 posts

Posted 23 April 2012 - 04:44 PM

small example

#include <ie.au3> Local $oInternet = _IECreate() $oInternet.Navigate("<a href='http://michaelo.pl/test_pdf/test.pdf' class='bbc_url' title='External link' rel='nofollow external'>http://michaelo.pl/test_pdf/test.pdf"</a>) ; 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  )

My contribution:
DumpDebugingBestCodingPractice Analyzer * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * NEW 21-09-2014: Debenu PDF Viewer SDK - UDF * Debenu Quick PDF Library - UDF * RTF Printer - UDF * XZip - UDFAcrobat Reader - ActiveX ViewerAppCompatFlags UDF

 

Other useful stuff - click the following Show button:

Spoiler

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute"  Donald Knuth

#7 DaleHohm

DaleHohm

    Think of IE as an API...

  • MVPs
  • 5,981 posts

Posted 23 April 2012 - 05:51 PM

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

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

 

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

 

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y
Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble


#8 mLipok

mLipok

    thinking does not hurt, ........ .......... but it takes time

  • Active Members
  • PipPipPipPipPipPip
  • 2,501 posts

Posted 29 April 2012 - 02:20 PM

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, 29 April 2012 - 06:43 PM.

My contribution:
DumpDebugingBestCodingPractice Analyzer * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * NEW 21-09-2014: Debenu PDF Viewer SDK - UDF * Debenu Quick PDF Library - UDF * RTF Printer - UDF * XZip - UDFAcrobat Reader - ActiveX ViewerAppCompatFlags UDF

 

Other useful stuff - click the following Show button:

Spoiler

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute"  Donald Knuth

#9 mLipok

mLipok

    thinking does not hurt, ........ .......... but it takes time

  • Active Members
  • PipPipPipPipPipPip
  • 2,501 posts

Posted 01 May 2012 - 07:12 PM   Best Answer

;)
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


My contribution:
DumpDebugingBestCodingPractice Analyzer * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * NEW 21-09-2014: Debenu PDF Viewer SDK - UDF * Debenu Quick PDF Library - UDF * RTF Printer - UDF * XZip - UDFAcrobat Reader - ActiveX ViewerAppCompatFlags UDF

 

Other useful stuff - click the following Show button:

Spoiler

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute"  Donald Knuth

#10 mLipok

mLipok

    thinking does not hurt, ........ .......... but it takes time

  • Active Members
  • PipPipPipPipPipPip
  • 2,501 posts

Posted 01 May 2012 - 07:34 PM

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

Edited by mlipok, 01 May 2012 - 07:40 PM.

My contribution:
DumpDebugingBestCodingPractice Analyzer * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * NEW 21-09-2014: Debenu PDF Viewer SDK - UDF * Debenu Quick PDF Library - UDF * RTF Printer - UDF * XZip - UDFAcrobat Reader - ActiveX ViewerAppCompatFlags UDF

 

Other useful stuff - click the following Show button:

Spoiler

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute"  Donald Knuth




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users