Jump to content

Print UDF


redndahead
 Share

Recommended Posts

Here is a UDF that will print any jpg; gif; or png file.

It's pretty simple just give it the filename and it will do the rest.

Future additions:

Choose what size you want the picture.

Choose how many pictures you want.

Print Text files

Print delimitted files as tables.

Tell me what you think. :ph34r:

http://www.autoitscript.com/fileman/users/red/udfs/_print.au3

red

Link to comment
Share on other sites

  • 1 year later...
  • 2 years later...

I'm currently rushing to find an appriate printing function, the one included with File.au3 UDF only prints input as text, I need to print files based on their formats, e.g. word documents, pdf files, images, ect.. Kid

It's disappointing to see the only UDF that could be appropriate doesn't even exist anymore. :)

Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()
Link to comment
Share on other sites

I'm currently rushing to find an appriate printing function, the one included with File.au3 UDF only prints input as text, I need to print files based on their formats, e.g. word documents, pdf files, images, ect.. Kid

It's disappointing to see the only UDF that could be appropriate doesn't even exist anymore. :)

How about the one I've posted a few times that uses IE's print function?

Func _PrintFile($filetoprint)
    RunWait(@COMSPEC & ' /c rundll32.exe ' & @SystemDir & '\mshtml.dll,PrintHTML "' & $filetoprint,"",@SW_HIDE)
EndFunc

This prints anything that IE can print. It'll resize pictures to fit on a sheet if you have IE7+ (if I remember right), but other than that doesn't allow you to choose the image size. Also, it will print the normal IE header and footers for HTML type files (text, pictures, etc...not word or pdf files, afaik).

Edited by james3mg
"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110
Link to comment
Share on other sites

I'm currently rushing to find an appriate printing function, the one included with File.au3 UDF only prints input as text, I need to print files based on their formats, e.g. word documents, pdf files, images, ect.. Kid

It's disappointing to see the only UDF that could be appropriate doesn't even exist anymore. :)

As well as james3mg's solution there is my print udf which lets you print images at any position and size on the page. But it won't deal with everything you want. For printing word docs I would expect that is done best by, um, Word, or Big_Daddy's Word udf.
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
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
 Share

  • Recently Browsing   0 members

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