svenax / sublimeprint Goto Github PK
View Code? Open in Web Editor NEWSimple print function for Sublime Text. Handles printing current file, selection, or clipboard.
Simple print function for Sublime Text. Handles printing current file, selection, or clipboard.
I have Virtual_PDF_Printer for printing into pdf file. I already change "used_printer" parameter into it. Cups says that the job is already completed but I can't find the printed text. Where should SublimePrint generate it's output? Or is it support printing to pdf file already?
In User Preferences, I have
{
"printer_1": "Brother_HL_2140_series",
...
"prompt_printer": true,
"media": "Letter"
}
(FWIW, I also have "DefaultMedia: Letter" in my ~/.enscriptrc)
The printer is still prompting for A4 paper.
As the title says.
Since the plugin is heavily dependent on enscript I would like to propose a solution which won't need a huge rewrite but is more of a workaround.
When printing a file with UTF-8 encoding you could issue a warning message and offer to try to encode the file using a different encoding, for example latin1, and then proceed to print. The Sublime API offers methods to change the encoding of a file. Or, if you don't want to do that, at least show a warning if someone tries to print a UTF-8 encoded file.
Right now it just prints gibberish without any prior warning.
When I try to print Sublime edit hangs:
i.e. on OSX 10.8.2 the rainbow spinny wheel of doom occurs and Sublime is locked down.
I went to File > Print entire file
I get this error when trying to print:
Traceback (most recent call last):
File "/Users/ganders1/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 526, in run_
return self.run()
File "SublimePrint in /Users/ganders1/Library/Application Support/Sublime Text 3/Installed Packages/Simple Print Function.sublime-package", line 141, in run
File "SublimePrint in /Users/ganders1/Library/Application Support/Sublime Text 3/Installed Packages/Simple Print Function.sublime-package", line 103, in printer_command
File "SublimePrint in /Users/ganders1/Library/Application Support/Sublime Text 3/Installed Packages/Simple Print Function.sublime-package", line 77, in get_printer
File "./encodings/ascii.py", line 26, in decode
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 5: ordinal not in range(128)
I believe that this SO article may help.
http://stackoverflow.com/questions/10561923/unicodedecodeerror-ascii-codec-cant-decode-byte-0xef-in-position-1
Upon installation of this on Windows 10 with sublime3 build 3114, I receive the error lpstat not found when I try to print out a document.
Does lpstat.exe exist on Windows, is there an equivalent, can lpstat be used from a 3rd party which is compiled for Windows, is there a workaround.
Using ST3 on a virtualized Win7 Pro.
Have carefully installed enscript from http://gnuwin32.sourceforge.net/packages/enscript.htm. (Used the zipped binaries). Checked the presence of enscript.exe and accompanying files in the bin folder. Set PATH to include the bin folder where enscript was installed.
SublimePrint was installed via Package Control. Verified the presence of 'Simple Print Function.sublime-package' in /AppData/Roaming/Sublime Text 3/Installed Packages. Restarted everything.
Receive error: "Command 'enscript' not found! Please review the documentation." when I attempt to print.
Am not a python programmer but review of the code in SublimePrint.py suggests that find_command only searches the paths in the BIN_PATHS array and issues the error shown above if enscript.exe is not found in those paths. It does not appear that setting windows PATH has any effect.
I think the fix would involve parsing windows PATH for the paths to try and then appending those to BIN_PATHS. Alternatively appropriate paths could be hard coded into BIN_PATHS but that seems rather inflexible.
I appreciate the work you have done to develop this. Hope this observation is helpful.
The repository description says "Sublime Text 2", but should just say "Sublime Text"
any idea why I get ร instead of single quotes when I print a file?
The error message is
Command 'lpstat' not found! Please review the documentation.
installing the suggested Enscript did not help
Excuse the dumb question: I have installed Enscript OK. Now, how do I "install", if that is the right term, SublimePrint in Sublime Text 3 please? I have tried "Install Package" but SublimeText is not an option. I guess I am missing a step?
I'm using Sublime Text version 3.0, build 3143 and just installed simple print today, but when I tried to Print Entire File I got the error message "Command 'lpstat' not found! Please review the documentation." I searched the SublimePrint repository for lpstat, but all I found was a line of code and no documentation on fixing this error.
It seems I cannot configure the SublimePrint's keyboard bindings. And given there's no print dialog and I've already printed out various documents by accident, I really, really need to be able to configure this.
I've looked in all the settings, I've configured Sublime keyboard bindings before, but I've not found a way to do this. I've tried modifying the sublime package and overriding the settings, with no results.
Getting the following error message after I install the package.
The package is partially working, as I can see new options have been added to my File
menu.
I know the printer is working as I just printed out something from WebStorm.
Any thoughts? I thought maybe it might be a file permissions issue, but I set it to the most permissive issues.
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 797, in run_
return self.run()
File "SublimePrint in /Users/Oracle/Library/Application Support/Sublime Text 3/Installed Packages/Simple Print Function.sublime-package", line 221, in run
ValueError: 'Brother_HL_L2340D_series' is not in list
reloading settings Packages/User/SublimePrint.sublime-settings
using gpu buffer for window
Unable to open /Users/Oracle/Library/Application Support/Sublime Text 3/Packages/Default/Preferences.sublime-settings
After installing through Package Control, I tried the following scenario on Ubuntu 13.04 and sublime-text-2:
If I try to print a non-saved file I get an error message saying "No file to print" which understandably is supposed to happen. But this is useful knowledge because it means it is in fact trying to do something.
Works like a charm but after installing I had no idea how to use it. Of course I quickly figured out that I could check the command palette if a new command was created for printing but it might be nice to add this hint (and maybe also the respective shortcuts for printing) to the readme/info that opens after installing the package.
Thanks! :)
Hello i would like use this plugin in combination with lpr
command, but it push --printer argument which is not known by lpr.
OSError: (['/usr/bin/lpr', '--printer=Samsung_ML-1670_Series', 'SublimePrint.sublime-settings'], 1, '/usr/bin/lpr: Error - unknown option "-".\n')
Can I pass the absolute path to enscript executable, my enscript is part of the Cygwin PATH which is not inside the Windows native PATH.
Is it possible to print to PDF using this package? What do I need to put in my settings to do this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.