1 post in this topic
Here is an UDF for managing printers.
Features are :
- add, remove or rename a printer
- add or remove a driver
- add or remove a TCP/IP printer port
- add or remove a LPR printer port
- connect to a remote printer
- enum printers and there configuration and properties
- pause resume or cancel all jobs of a printer
- checks if a printer exists
- print a test page
- set the default printer
Looking to automate...I have PDF files...Need to convert them all to 2 pages each but more specifically, retain only the first and last.
Searched a lot and hitting the wall....Any ideas? Just directions would do...
Not sure how to "print to file" and I believe |ShellExecuteWait($sFilePath, " /h /p", "", "print", @SW_HIDE)| doesn't give options of what pages...
I have a project to print a prn printfile to a barcode printer. File is both binary (fonts and pictures) and text mixed in a format understandable for the printer. I need some advice about the methode to deal and use windows printer spooler. The printers could be connected in network or localy by USB, so easiest is to make that connection by windows.
I have not found any easy way to print in the site, just how to setup a new printer or change parameters. I thought printing was the easy part.
My program should be used by windows vista, 7, 8 and 10 and sometime in POS environment.
Right now I print by FTP to CAB printers, but its not always accepted in some networks or by firewalls. I need to change it, and also be open to use other printers.
The option I have seen is windows LPR command, but I dont know if its usable in all windows versions or if it behave different. I tested it from cmd.exe, but have not succeded for the printers I normaly use.
Copy to LPT or COM is also an alternative. DIsadvantage is I need to change in driver to connect LPT/COM to the printer and not userfriendly to install.
I want a solid solution, not complicated for the user and easy to understand and maintain.
Just a procedure in Auto-IT like 'Print ("Printer name", "File")' to put it in the que, and leave the printer maintain to windows.
Any ideas or considirations?
Where to begin?
(soory for the speling, not my naitive language)
So instead of reinventing the wheel. I was trying to find a way auto launch this window to search for printers on the network. we are moving to a more universal naming convention based on printer location so I wanted to give users the easiest way I know of to find and map to a printer. Is there a way to auto launch this window. is it contained somewhere I can access on the computer?
thank you for the assistance
This function parser printing-like intervals (like "1,2,3-5") and returns an array with every page number as item.
Ex.: "1,2,3-5" will return an array which 0th element is "5" (page count) and the items are 1, 2, 3, 4 and 5. The array is given in the order the $interval parameter is set, and reverse intervals are also supported (e.g.: "8,4,7-5" will return items 8, 4, 7, 6, 5 and 0th element is 5).
If it fails, it will return False and set error to non-zero (invalid string).
#cs Range parser This function parser printing-like intervals (like "1,2,3-5") and returns an array with every page number as item. @author Jefrey S. Santos <jefrey[at]jefrey.ml> #ce Func rangeparser($interval) $interval = StringReplace($interval, " ", "") If Not StringRegExp($interval, "([0-9\-\,])") Then Return SetError(1, 0, False) $interval = StringSplit($interval, ",") Dim $return For $i = 1 To $interval If StringInStr($interval[$i], "-") Then $split = StringSplit($interval[$i], "-") If $split <> 2 Then Return SetError(1, 0, False) If $split = $split Then ReDim $return[UBound($return)+1] $return[UBound($return)-1] = $split Else If $split < $split Then $step = +1 Else $step = -1 EndIf For $j = $split To $split Step $step ReDim $return[UBound($return)+1] $return[UBound($return)-1] = $j Next EndIf Else ReDim $return[UBound($return)+1] $return[UBound($return)-1] = $interval[$i] EndIf Next $return = UBound($return)-1 Return $return EndFunc