Sign in to follow this  
Followers 0

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

10 posts in this topic

#1 ·  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

Community news:  Refreshed Forum Rules     Please fix your own Signatures
My contribution and other useful stuff - NEW: UDF for PDFCreator v1.x.x for other click the following "Reveal hidden contents" button:

Last updated: 2015-08-25

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 
My contribution (my own projects): Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * NEW: UDF for PDFCreator v1.x.x * XZip - UDF * TeamViewer API - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft Components *

My contribution to others projects: * _sql.au3 UDF  * SMTP Mailer UDF * _POP3_Ex.au3 UDF *  RTF Printer - UDF * 

Useful links: Forum etiquette * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * How to post code on the forum

 


"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
naughty.gif  :ranting:, be  smile.png and       \\//_.

Share this post


Link to post
Share on other sites



#2 ·  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


Community news:  Refreshed Forum Rules     Please fix your own Signatures
My contribution and other useful stuff - NEW: UDF for PDFCreator v1.x.x for other click the following "Reveal hidden contents" button:

Last updated: 2015-08-25

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 
My contribution (my own projects): Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * NEW: UDF for PDFCreator v1.x.x * XZip - UDF * TeamViewer API - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft Components *

My contribution to others projects: * _sql.au3 UDF  * SMTP Mailer UDF * _POP3_Ex.au3 UDF *  RTF Printer - UDF * 

Useful links: Forum etiquette * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * How to post code on the forum

 


"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
naughty.gif  :ranting:, be  smile.png and       \\//_.

Share this post


Link to post
Share on other sites

#3 ·  Posted

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

Share this post


Link to post
Share on other sites

#4 ·  Posted

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

Share this post


Link to post
Share on other sites

#5 ·  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


Community news:  Refreshed Forum Rules     Please fix your own Signatures
My contribution and other useful stuff - NEW: UDF for PDFCreator v1.x.x for other click the following "Reveal hidden contents" button:

Last updated: 2015-08-25

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 
My contribution (my own projects): Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * NEW: UDF for PDFCreator v1.x.x * XZip - UDF * TeamViewer API - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft Components *

My contribution to others projects: * _sql.au3 UDF  * SMTP Mailer UDF * _POP3_Ex.au3 UDF *  RTF Printer - UDF * 

Useful links: Forum etiquette * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * How to post code on the forum

 


"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
naughty.gif  :ranting:, be  smile.png and       \\//_.

Share this post


Link to post
Share on other sites

#6 ·  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  )

Community news:  Refreshed Forum Rules     Please fix your own Signatures
My contribution and other useful stuff - NEW: UDF for PDFCreator v1.x.x for other click the following "Reveal hidden contents" button:

Last updated: 2015-08-25

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 
My contribution (my own projects): Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * NEW: UDF for PDFCreator v1.x.x * XZip - UDF * TeamViewer API - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft Components *

My contribution to others projects: * _sql.au3 UDF  * SMTP Mailer UDF * _POP3_Ex.au3 UDF *  RTF Printer - UDF * 

Useful links: Forum etiquette * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * How to post code on the forum

 


"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
naughty.gif  :ranting:, be  smile.png and       \\//_.

Share this post


Link to post
Share on other sites

#7 ·  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


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

Share this post


Link to post
Share on other sites

#8 ·  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

Community news:  Refreshed Forum Rules     Please fix your own Signatures
My contribution and other useful stuff - NEW: UDF for PDFCreator v1.x.x for other click the following "Reveal hidden contents" button:

Last updated: 2015-08-25

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 
My contribution (my own projects): Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * NEW: UDF for PDFCreator v1.x.x * XZip - UDF * TeamViewer API - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft Components *

My contribution to others projects: * _sql.au3 UDF  * SMTP Mailer UDF * _POP3_Ex.au3 UDF *  RTF Printer - UDF * 

Useful links: Forum etiquette * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * How to post code on the forum

 


"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
naughty.gif  :ranting:, be  smile.png and       \\//_.

Share this post


Link to post
Share on other sites

#9 ·  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


Community news:  Refreshed Forum Rules     Please fix your own Signatures
My contribution and other useful stuff - NEW: UDF for PDFCreator v1.x.x for other click the following "Reveal hidden contents" button:

Last updated: 2015-08-25

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 
My contribution (my own projects): Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * NEW: UDF for PDFCreator v1.x.x * XZip - UDF * TeamViewer API - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft Components *

My contribution to others projects: * _sql.au3 UDF  * SMTP Mailer UDF * _POP3_Ex.au3 UDF *  RTF Printer - UDF * 

Useful links: Forum etiquette * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * How to post code on the forum

 


"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
naughty.gif  :ranting:, be  smile.png and       \\//_.

Share this post


Link to post
Share on other sites

#10 ·  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

Community news:  Refreshed Forum Rules     Please fix your own Signatures
My contribution and other useful stuff - NEW: UDF for PDFCreator v1.x.x for other click the following "Reveal hidden contents" button:

Last updated: 2015-08-25

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 
My contribution (my own projects): Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * NEW: UDF for PDFCreator v1.x.x * XZip - UDF * TeamViewer API - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft Components *

My contribution to others projects: * _sql.au3 UDF  * SMTP Mailer UDF * _POP3_Ex.au3 UDF *  RTF Printer - UDF * 

Useful links: Forum etiquette * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * How to post code on the forum

 


"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
naughty.gif  :ranting:, be  smile.png and       \\//_.

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