Sublime Forum

Printing possibility - txtPrint

#1

I have used this in the past with Notetab light to print all types of formats - essentially it looks like Notetab light would send txtPrint the name of the file to print:

sourceforge.net/projects/txtprint/

Is there some plugin already in existence or command that would enable to call out to this external tool to print?

I just started using Sublime about 3 days ago so forgive the lack of knowledge

Not having printing is a major issue for me - I did not realize the editor would NOT have printing - never gave it a thought as it is such a simple thing

Any comments or ideas would be great

0 Likes

#2

agibsonw and I have been throwing together a plugin to do just this (amongst other things).

Download zip at github.com/facelessuser/PrintHtml (mine is not the default branch; mine is a fork of agibsonw 's, but mine automatically pops up the print dialog in the web brower; agibsonw hasn’t pulled it in yet).

Make sure the plugin is in Packages/PrintHtml (in the zip file it will be named something else)

Put this in Packages/User/Default.sublime-commands. I picked a theme with a white background for printing.

{ "caption": "Print: Print in Broswer", "command": "print_html", "args": {"numbers": true, "browser_print": true, "color_scheme": "Packages/Color Scheme - Default/Mac Classic.tmTheme"} },

It is fairly configurable, and it is currently under heavy development, so things might change. But this will allow you to execute the “Print: Print in Browser” command from the command palette. It will convert your view into an HTML file and open it in your default HTML application (it should be a web browser). And it will popup your browsers print dialog.

0 Likes

#3

Looks like there is also this plugin as well github.com/svenax/SublimePrint, so there are options.

0 Likes

#4

Very cool! I used to write Python code so I have been looking at the plugin API to see what’s involved - I will give it a try - thanks!

[quote=“facelessuser”]abigsnow and I have been throwing together a plugin to do just this (amongst other things).

Download zip at github.com/facelessuser/PrintHtml (mine is not the default branch; mine is a fork of abigsnow’s, but mine automatically pops up the print dialog in the web brower; abigsnow hasn’t pulled it in yet).

Make sure the plugin is in Packages/PrintHtml (in the zip file it will be named something else)

Put this in Packages/User/Default.sublime-commands. I picked a theme with a white background for printing.

{ "caption": "Print: Print in Broswer", "command": "print_html", "args": {"numbers": true, "browser_print": true, "color_scheme": "Packages/Color Scheme - Default/Mac Classic.tmTheme"} },

It is fairly configurable, and it is currently under heavy development, so things might change. But this will allow you to execute the “Print: Print in Browser” command from the command palette. It will convert your view into an HTML file and open it in your default HTML application (it should be a web browser). And it will popup your browsers print dialog.[/quote]

0 Likes

#5

I saw this but could not make it work - I will re-visit - thanks

0 Likes

#6

@fosslissbunder

?

0 Likes

#7

[quote=“agibsonsw”]@fosslissbunder

?[/quote]

Couldn’t remember how to spell your name and I was too lazy to look it up…gibson. That makes much more sense than bigsnow. :smile: Now corrected.

0 Likes