Sign in to follow this  
Followers 0
jparada

Print pdf silent

2 posts in this topic

Hi,

Until yesterday I had not heard about AutoIt, I was looking for information on how to print a PDF file silently, and that's how I found the code below.

from here:

#include <DDEML.au3>         ;<= load down from examples
#include <DDEMLClient.au3>   ;<= load down from examples

$FnToPrt = "C:\Test.pdf"

ShellExecute("AcroRD32.exe","/h")
Opt("WinTitleMatchMode", 2)
WinWait("Reader","",10)
sleep(500)
$szService = "Acroview"
$szTopic = "Control"
$szCommand = '[FilePrintSilent("'&$FnToPrt&'")][AppExit()]'
_DDEMLClient_Execute($szService, $szTopic, $szCommand)

But I know nothing, as I already said before, I download AutoIt v3 and installed it on my Windows Vista 64 bits, I copy and save the code above, with the extension AU3, and run script option, select my file print_pdf.au3, and shows me an error ...."# <DDEML.au3> include Error: Error opening the file.

I do not know anything about AutoIt, I came here because of the need to print a pdf file in silent mode.

I very much appreciate if someone could help me and comment what is wrong with the script, and how to fix.

Thank you.

Best Regards,

Javier

Share this post


Link to post
Share on other sites



You are missing 2 files. DDEML.au3 and DDEMLClient.au3

It took some searching in old posts but I finally found them

http://www.autoitscript.com/forum/index.php?app=core&module=attach&section=attach&attach_id=18227

Now there may be other issues.

First extract those files to the same folder as your script and change both of those #include lines by changing < and > to "

Example

#Include "DDEML.au3"

That is very old code and if you read this thread

you will see that it had some issues which may or may not have been resolved. All you can do is try it.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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