Jump to content

Recommended Posts

Posted

Hi All,

Help needed I am stuck here - printing/ saving webpage in PDF.

; *******************************************************
; Example 3 - Get a reference to a specific form element and set its value.
;               Call _IELoadWait manually if the default _IELoadWait experiences trouble.
; *******************************************************

#include <IE.au3>

$oIE = _IECreate("http://www.google.com")
$oForm = _IEFormGetObjByName($oIE, "f")
$oQuery = _IEFormElementGetObjByName($oForm, "q")
_IEFormElementSetValue($oQuery, "AutoIt IE.au3")
_IEFormSubmit($oForm, 0)
_IELoadWait($oIE)
_IEAction($oIE, "print") ; Here i am stuck
printpdf ()

Func printpdf ()
;not sure how to print to pdf and save created pdf file to a location
EndFunc

 

Kindly point me to the right direcction. 

Cheers, Vin

Posted

There is an old printing UDF that Martin made that may prove of use for you. I am not good at scripting but it looks like to me with that you can choose the printer so in your case the PDF Printer and then save the results.

Posted

I have downloaded Martin's UDF, I also tried my hands on a couple of examples. However, failed to print webpage to PDF.

I have resulted to send Keys and Window controls. Really, I do hope I stumble on something more promissing. I know its in there somehow.

Cheers

Vin

Posted

search Forum for PDFCreator

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...