![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | ps and printing I sure do find this thread useful. I have written my first powershell script and want to send it's output nightly to our laser printer. Everything seems to be working fine, except that my secretary complains that the (default) font is too small to read. Now, I'm not sure I've ever installed/deleted/selected or unselected any font. So, my question....how can I specify which font or font size I would like to be printed at run time. I've looked for an answer now for several weeks (out-printer doesn't seem to have anything to help) and just can't seem to find anyone talking about printers and fonts. Any help...gulp... My application queries an sql db and prepares a unicode report nightly, (text), which presently, I'm simply piping to the printer using 'out-printer' |
My System Specs![]() |
| | #2 (permalink) | ||||||||||||
| Guest | Re: ps and printing On Dec 15, 1:08 pm, "RS" <fp...@xxxxxx> wrote:
The Out cmdlets do not format objects; they just render them and send them to the specified display destination. No way that i can see to get powershell to change the font size before sending it to out-printer. What I would suggest is sending the output to a text file, then opening it with word, changing the size, then printing it. IE #Generate a file Get-Help Get-WmiObject -Full | Out-File -Encoding 'Unicode' -FilePath 'C:\test.txt' Create a Word App $w=New-Object -ComObject Word.Application #Load your file $w.Documents.Add('C:\test.txt') > $null #If you don't pipe it to null it spits out lots of useless information #Change Font Size $w.ActiveDocument.Content.Font.Size = 20 #Send To Default Printer $w.PrintOut() #Close File Discarding Changes $w.ActiveDocument.Close(0) #Close Word $w.quit() Not ideal but hopefully its a workaround until someone smarter than I can help out. GL | ||||||||||||
My System Specs![]() | |||||||||||||
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| UAC and Printing | Knihtisk | Vista print fax & scan | 3 | 03-27-2008 01:15 PM |
| Printing | gwen | Vista music pictures video | 0 | 09-19-2007 08:22 AM |
| HP Printing | RK_Tekt | Vista print fax & scan | 0 | 08-06-2007 01:08 PM |
| Printing | Don Loeb | Vista networking & sharing | 4 | 06-22-2007 09:55 AM |
| Re: printing from win 98 ???? I still need help with this | J | Vista print fax & scan | 3 | 04-18-2007 03:20 PM |