- How do I set up «print to file» in windows 10
- Solved: print to file
- b1ffyi59
- huggie54
- DoubleHelix
- Jessica-chen
- How can I print full path of an executable command in Windows?
- 3 Answers 3
- ‘Pretty print’ windows %PATH% variable — how to split on ‘;’ in CMD shell
- 11 Answers 11
- Customizing Print to File in WIndows
How do I set up «print to file» in windows 10
None of the current answers seem to fit my problem. Here is more information. I have two printers but the drivers for both of them are not compatible with Windows 10, which is the only OS on this computer. So, I would like to print-to-file, send the file to another computer, and print the file from that computer.
Thank you for posting your concern here at the Microsoft Community forum.
Which program are you using for ‘Print to file’?
Did you try installing the printer drivers in compatibility mode and check if it works?
Not all programs support the Print to file option. In most programs, the Print to file option is a check box on the Print dialog box. You may try these steps and check if it helps.
- On the File menu, click Print.
- In the Name box, click the printer you’ll use to print the file.
- Select the Print to file check box, and then click OK.
- In the File name box in the Print to file dialog box, type a file name
You may refer this screenshot:
You may also refer this Microsoft article. This article is for Windows 7 but it is also applicable for Windows 10 Technical Preview 2.
Print to file
Hope this helps. If you need further assistance with Windows, let us know and will be glad to help.
Solved: print to file
b1ffyi59
huggie54
I think I know what you mean, are you getting the little box that comes up that asks for a filename? but gives you no option of browsing for location?
If so, you can type in a location for that file as well as filename. BUT to make it easier go to http://www.mlin.net/misc.shtml & download «PathCopyX»
Now before you print to file, right click on the folder you want to print to then select «Copy Path to Clipboard» then type your filename adding the extension of .ps or .prn which ever you prefer.
For a true .ps file the printer driver must be a Postscript Printer Driver.
DoubleHelix
I would suggest a PDF printer. Here’s a stable one that I’ve been using for years and doesn’t have any ads.
Jessica-chen
Hi, I just found the following information for you. You can check whether it suits your case.
NOTE: This will only work for you if your printer is NOT connected through a USB port. It must be connected through the old printer port.
Have you ever attempted to use the «Print-to-file» check box? It’s not complicated and its purpose is to save the document in a form that the printer can read (in order to print it again at another time — or in another place). This gives you the convenience of printing the file without having to open the application from which it was originally created.
Suppose you create a document using Microsoft Word. Here are some options you have if you print the document to a file:
Print the document without opening Word.
Email the document to someone who doesn’t have Word on their computer, and they can still print the document.
Suppose you download a PDF file from the internet (which is opened by Adobe Acrobat Reader) and you want to save it on you computer. Most of the time you cannot save these files — you can only print them. In this case you would print to a file on your desktop, or wherever, and you can print it as many times as you want after that. (You have saved it to your computer)
These are just a few suggestions, but you can see why it would be nice to be able to use this feature. The instructions below provide the steps you should take to use this feature:
Saving the file:
Click on «File | Print» to open the print dialog box.
Click on «Print to File.» This will open a «Save As» dialog box.
Give the file a name, being careful to leave the «.prn» as the extension, and, keep track of where you are saving it on your computer.
Printing the file:
Navigate to the folder in which the PRN file has been saved.
Click on «Start | Run» — This opens the «Run» dialog box.
Type the following, and press the «OK» button: command.
This opens a «DOS» window.
In the DOS window type the following:
copy (Name of file.prn) /b lpt1
«copy» is a DOS command that sends a copy of a file from one place to another.
«Name of File» is the name you gave your file. (be sure to include «.prn»)
There should be a «space» between the filename and the «/b», and between the «/b» and «LPT1»
The «/b» tells the computer this is a «binary» file.
«LPT1» is the printer port. You are sending a copy of this file from your computer to the printer.
If your printer is turned on it should print the document as soon as you press the [Enter] key.
A couple of extra hints
If you are emailing to a friend be sure to refer them to this page for instructions on how to print the file.
If you don’t both have the same printer be sure you do one of the following:
Install their printer drivers on your computer and select that printer before printing to file. (Click on «Start | Settings | Printers» and double-click on «Add New Printer»)
It doesn’t hurt to install as many printers on your computer as you wish, even if you don’t have the printer connected — Just don’t try to print unless it is to a file.
OR
Have them install the printer drivers for your computer on their machine using the same technique.
How can I print full path of an executable command in Windows?
At the moment when trying to run tf command and/or any other run-able command, I need to open Visual Studio Command to get it executable. I like to use the normal console and/or the alternative console but failed to call tf .
So, I need to print the full path of tf and any runable-command but don’t know how to do so.
3 Answers 3
I’m not really sure what you are asking, but judging by your comments, you may be looking for where .
The second example will place the whole path into the clipboard.
If I remember correctly, where.exe needs to be added to XP/2003 from the Windows 2003 Resource Kit or XP Support Tools.
According to Microsoft, you should find tf in :\Program Files\Microsoft Visual Studio x\Common7\IDE .
(I’ve substituted x in the version because I don’t know which version you’re using.)
According to the Walkthrough: Working with Team Foundation Source Control from Command Line, (and assuming VS 2005), you can access the tools for TF at the following path:
:\Program Files\Microsoft Visual Studio 8\Common7\Tools
where.exe as mentioned in one of the comments does come with Windows 7 and higher. Another thing to note is that where only searches the %PATH% so if your program isn’t in the path it won’t help you locate it.
Another problem is if you happen to be trying to invoke it from within a PowerShell prompt you NEED to include the .exe portion, as «where» is an alias for Where-Object which is NOT what you want, and leads to empty results with success codes that obviously don’t tell you where the application you want is actually located.
This took me a few tries to figure out, and only appending -? which triggered help on what the alias actually resolved to clued me in.
Per your question, the reason tf works from within the Visual Studio application/console, there is a specific shortcut they include to launch a Visual Studio console because it adds the application’s folders to the PATH when launched.
‘Pretty print’ windows %PATH% variable — how to split on ‘;’ in CMD shell
I want to run a simple one-liner in the Windows CMD prompt to print my %PATH% variable, one entry per line.
I tried this: for /f «delims=;» %a in («%path%») do echo %a but this only prints the first entry:
Also as you can see from the output above, this is also printing the echo %a command as well as the output. Is there any way to stop this?
If I try a similar command, I get all the entries, but still get the echo %a output spamming the results. I don’t understand why the following prints all entries, but my attempt on %PATH% doesn’t. I suspect I don’t understand the /F switch.
11 Answers 11
The simple way is to use
This works for all without ; in the path and without » around a single element
Tested with path=C:\qt\4.6.3\bin;C:\Program Files;C:\documents & Settings
But a «always» solution is a bit complicated
EDIT: Now a working variant
What did I do there?
I tried to solve the main problem: that the semicolons inside of quotes should be ignored, and only the normal semicolons should be replaced with «;»
I used the batch interpreter itself to solve this for me.
- First I have to make the string safe, escaping all special characters.
- Then all ; are replaced with ^;^;
- and then the trick begins with the line
set var=%var:»=»»%» (The missing quote is the key!).
This expands in a way such that all escaped characters will lose their escape caret:
var=foo & bar;;baz<>gak;;»semi^;^;colons^;^;^&embedded»;;foo again!;; .
But only outside of the quotes, so now there is a difference between semicolons outside of quotes ;; and inside ^;^; .
Thats the key.
a strips the quotes from each item, I see. I don’t understand what «%path:;=»;»%» does — are you able to explain this? (Completely happy that this works for me though, thanks!) – sam Mar 29 ’11 at 12:41
A simple one liner to prettying printing the PATH environment variable:
If your PATH was equal to A;B;C the above string substitution will change this to ECHO.A & ECHO.B & ECHO.C and execute it all in one go. The full stop prevents the «ECHO is on» messages from appearing.
An update to Stephan Quan’s very clever one-liner solution: The problem I encountered was that a trailing semi-colon — (and maybe two successive semi-colons, i.e. empty path element) would cause the message «ECHO is on» to appear. I solved this by inserting a period immediately after the second ECHO statement (which is the syntax to suppress ECHO is on/off messages). However, it will result in an extra empty line:
I have minor improvements to jeb’s clever «always» solution. Currently jeb’s solution has the following issues:
- If the leading path is enclosed in quotes, then the first output starts with «»
- If the trailing path is enclosed in quotes, then the last output ends with «»
- If any path contains harmless but non-functional consecutive «», then the output preserves the «»
- If var contains consecutive ;; delimiters then outputs ECHO is off
This solution fixes the minor issues, plus it uses 2 fewer substitutions. Also I eliminated the unnecessary repeated enabling/disabling delayed expansion within the loop. (Edit on 2011-10-30 simplified the ENDLOCAL logic)
If you want to see a blank line for each empty path resulting from consecutive ;; delimiters, then the last line of the FOR loop can simply read echo(%%
Or perhaps it would be more obvious to display empty paths as «» using:
if %%a==»» (echo «») else echo %%
The various empty path fixes work for jeb’s simple solution as well.
Customizing Print to File in WIndows
I have a requirement where my client want to install a custom «Print to File» printer (apparently MS has an SDK for this?). They want to be able to install this as a kind of «application» so that if someone chooses to print to this printer, they have to answer a few questions, and the file gets «printed» to a path of our choosing. (we will then do some other things with the file such as rename it and SFTP it)
I have tried googling, looking for things such as «customize print to file» and I have found nothing. Does anyone have any experience with this and can give me a kick in the right direction?
EDIT: I would rather have a c# oriented solution but I am willing to take anything right now.
Edit 2: The idea is for this «custom print driver» is for a document imaging company to provide an easy method for their customers to store/archive documents. The idea, is that the customer, if they want to store/archive a document, they would print, from standard windows applications such as Word, Excell, Acrobat Reader, Web Pages, etc., to the «company X» printer driver. When doing so, the document would get «printed» to a file in a specific location that another application (which has a filewatcher service on it, which would rename it and send it to the SFTP server), knows to watch. The document that is printed to the file, should ideally also be able to come out on paper (AKA just like normal). When printing to the «Custom print driver», we also need to have a form filled in which would provide meta-tags for the archiving system, which would also be uploaded to the document imaging system.
I am not looking to recreate a printing application, nor am I looking to add «printing» into a custom application. This needs to work at the Windows level.
I have no problems with the SFTP, FileWatcher, Alchemy integration (the document archiving application) or the document renaming portion. It’s the «custom print driver» that I am having issues with. This is all compounded by the fact that when installing the application, I need to automatically install the «custom print driver», and configure it during the install process. Essentially the solution needs to be installed as a printer available under «My Printers» and should be available for any type of document, Word, Excell, PDF, etc. Oh, and it needs to be availabe for XP, Vista, and Windows 7 . . . . 🙁
Thanks in advance for everyones help. I have a feeling that this one is going to be a doozy 🙁