-
Notifications
You must be signed in to change notification settings - Fork 29.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support to print the editor contents #5953
Comments
Is printing support still on the backlog? It is tedious to have to switch temporarily to another editor just to print. |
NetBeans handles this very nicely. Unfortunately the course I am taking (edx, naturally) defaults to Microsoft. |
Is editor printing going to be ready soon? |
I hope it will be in the pipeline anytime soon in '17 at least for insiders edition of vscode |
Should be available. |
I am adding this as a wishlist item. |
Adding my vote for printing. Sometimes not so much as to dead trees but as to a PDF. |
Is there any official answer to why the printer function is not easy? |
I don't print files frequently, but occasionally I really need a paper copy. I was shocked, when I tried to print a file for the first time, to find that VSCode lacked this basic facility! It is standard in almost all editors. Currently I must switch to another editor, such as BBEdit, for a tidy syntax colour-coded printed copy. I would prefer to have the same syntax colouring for screen and paper. I would think this facility should take precedence over some of the tweaks and features recently added to VSCode... Please, can we have a definite deadline for adding printing to VSCode. |
Printing is useful, in addition paper printing, PDF file output or something else are needed in some cases. Is the root cause is he limit of the foundation? V8 engine or some middle layers. |
Please add the ability to send your code to a printer. You'd think this would have been a 1.0 feature. |
One thing to add here -- print isn't necessarily to a printer. It would be very convenient to print the preview window of a diagram (PlantUML) or Markdown file to the Microsoft PDF printer to obtain a sharable document. |
I'd really like to be able to print Markdown - nothing is more legible than print on paper, and reviewing (and scribbling) on hard copy is a key part of my documentation workflow. |
So, since MSFT is sending a royal we-couldn't-care-less (kind version of what I'd like to say) to all of us because they think this isn't an important feature to address, I've found the following to help those of us that are willing to try and implement this ourselves. May take a stab at it at some point when time is more on my side if it doesn't get hit on soon by someone. There's a node.js module dubbed node-printer that @tojocky has developed that brings native printing support to whatever OS you may be on. Maybe he'd be willing to chime in as well on this. Not sure if that would be a good starting point or not: Also, found this thread that has some good insights within it: Will keep looking around for options... |
This is something Microsoft has implemented hundreds of times for various applications they've created, APIs in Windows itself and so on... How hard can this really be for them? Why wasn't it available from the very beginning? |
I would love this feature, because I have to print code for the university.. |
Come on, please sort it out! This is absolutely basic. |
I'm exploring a few things until Microsoft finally adds basic File -->Print in VSCode:
Mildly related and outside VSCode there's also some tips in the following post for Printing Github Markdown. |
I just find myself opening up notepad++ and doing the printing. Which sorta indicates that this is probably not that hard to integrate. |
+1 We need this feature absolutely! |
The bus factor. What if MS does a breaking change and Peter is no longer available to maintain it? It has to be forked, etc. |
This is the point of open source, surely? Nothing would stop them from on-boarding it if reports of my demise were accurate. But you are right. Microsoft has already made a breaking change in respect of the way commands are proxied between remote and workstation processes, which was the devil to work around and has resulted in reduced functionality - I cannot currently support printing with the alternate browser from a remote workspace. I provided a full bug report including a repro demo project more than a month ago. The silence is deafening. As a matter of interest, I just refactored the whole thing to support language associated rendering providers implemented as separate extensions. This means if you want special handling for a particular format you can achieve this without having to build a whole system for managing resource delivery to concurrent print sessions and cross-platform browser wrangling. Printing of rendered Markdown is the original use-case for this, and it's re-implemented to internally use the API. There's a sample extension for printing SVG files. This is intended as a simple worked sample (you don't have to do much to embed SVG in a web page). Refactored like this, the Print extension proper really should be integrated into VSCode. Apart from anything else, once you have all the machinery for generating and styling HTML, there's very little remaining in building a preview pane. I was planning on getting a demo of this into shape as preparation for pitching official adoption of my project. |
Nobody prints their code. What you are asking is a 1 in a million usecase. Maybe "Export to PDF" could be useful, but print that PDF however you see fit. |
Judging from the number of times this has been requested and the number of people clamoring for it, I believe you are incorrect. I print code all the time when I'm reviewing it or when I know I will be away from my computer and I need to mark it up.
Greg
…________________________________
From: Rok Kralj ***@***.***>
Sent: Saturday, March 4, 2023 11:54 AM
To: microsoft/vscode ***@***.***>
Cc: Gregory Dyess ***@***.***>; Mention ***@***.***>
Subject: Re: [microsoft/vscode] Support to print the editor contents (#5953)
Nobody prints their code. What you are asking is a 1 in a million usecase.
—
Reply to this email directly, view it on GitHub<#5953 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFCDAI73GKOGXXXJ4B4QCSDW2N6U5ANCNFSM4CCIEN6A>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
You are absolutely WRONG.
People DO want to print their code. That is why we are asking for the capability.
Other programming environments provide printing as a standard.
I have been writing code, in many languages and environments, and printing it out for decades.
If you only write simple stuff, you can make do with looking at it through the keyhole of a screen.
But for large and complex programs, I find it best to review code with a printed copy so i can write on it.
There are so many advantages in doing it that way.
… On 4 Mar 2023, at 17:54, Rok Kralj ***@***.***> wrote:
Nobody prints their code. What you are asking is a 1 in a million usecase.
—
Reply to this email directly, view it on GitHub <#5953 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AFKJ2Q5HJHSG4HTQDRNV2A3W2N6U5ANCNFSM4CCIEN6A>.
You are receiving this because you were mentioned.
|
Uninformed, unconstructive, and overall unnecessary addition to this conversation, but thanks for your opinion? |
500 nobodies install my print extension every day. To date there are about 440,000 installs of a print extension. I'm fairly sure the user base for VS Code isn't 440 billion. You created a GitHub account in 2022 and you seem to focus on Scala. I checked the job listings just now.
Tell me again what nobody uses. Snark aside, there are 7 COBOL jobs listed, and all of them pay well because the banks in question care deeply about a language that nobody uses. |
Let me explain you the use case that I concretely was going through needing the functionality of requiring paper based copies of the source code. I was teaching c language to young children aged 12 to 14 years old. I had code examples, skeletons, that I wanted them to complete. However to check if they really u understood the code, wanted them to FIRST complete on paper before they could type in the examples. What is wrong with this approach? Seems your feedback is very narrow minded. A decent source code editor should be able to print code on a piece of paper. |
By nobody I did not mean the literal nobody, chill folks. I meant a tiny fraction. Printing dependencies are heavy and there is no reason the majority of users carry this cost of a tiny minority of users. This is why I suggested you export the code to PDF, then print the resulting PDF in a program of your choice. Or an extension - this is exactly what extensions are for, so every person can customize their program according to their needs. VS code is already quite bloated, and we managed to cut the printing stuff out (see bug #166511). So technically your feature request is even farther from being delivered now, and that is definitely right thing to do.
Wrong. I created my GitHub account in 2013 and Scala is only my passion, not my job. |
Since when are library dependencies a reason not to include a functionality? Strangely there are 3rd party developers who have added print functionality to vs-code without the need for heavy library dependencies ... If I would have known that these extensions existed I would have used them to print the papers. So folks: for your clarity, there will be no print function in vs-code, to ensure you all understand it. Vs-code is an editor that does not need a print function. Only a tiny fraction of users want to print code on paper. This is honestly one of the most incompetent feedback I've seen in years. Mind boggling. I printed my source code in visual studio instead. |
When I'm on Windows, that is the option I go for. I do the majority of my work on Linux, so Visual Studio isn't an option unless I save my file on a common location, turn to my Windows machine, pull up the source file and print.
It seems M$ has been intentionally making printing harder and harder to do. VS2008 was great. VS2015, you can't even save your page layouts! Every time I start VS2015 and go to print, I have to reset the margins, headers, etc because they cannot be saved!
I guess the uninformed are more firmly in control at M$ than I thought.
Peter, thanks for your extension. I wish it were not necessary.
Greg
…________________________________
From: Sven Van de Velde ***@***.***>
Sent: Sunday, March 5, 2023 9:07 AM
To: microsoft/vscode ***@***.***>
Cc: Gregory Dyess ***@***.***>; Mention ***@***.***>
Subject: Re: [microsoft/vscode] Support to print the editor contents (#5953)
Since when are library dependencies are reason not to include a functionality?
Strangely there are 3rd party developers who have added print functionality to vs-code without the need for heavy library dependencies ...
If I would have known that these extensions existed I would have used them to print the papers.
So folks: for your clarity, there will be no print function in vs-code, to ensure you all understand it. Vs-code is an editor that does not need a print function. Only a tiny fraction of users want to print code on paper.
This is honestly one of the most incompetent feedback I've seen in years. Mind boggling.
I printed my source code in visual studio instead.
—
Reply to this email directly, view it on GitHub<#5953 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFCDAI4WYTDSTXFPGQ3UK3DW2ST3HANCNFSM4CCIEN6A>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
In which way exactly is that different to "printing"? Do you suggest to create PDFs without taking concepts like paper sizes, layouts, colors, text rendering etc. into account?
It's REALLY about time that you leave your tiny little bubble and get in touch with the real world. :-) |
Thorsten, stop being abusive.PDF is really an encapsulation of PostScript, which was developed at Adobe for driving displays and printers. If the software can generate PDF, it just needs a generic printer driver to actually print documents. By the way, I have a laser printer. Plenty of people have printersWith a little thought you can probably realise the reasons for that. Sent from my iPhoneOn 5 Mar 2023, at 20:23, Thorsten Schöning ***@***.***> wrote:
This is why I suggested you export the code to PDF, then print the resulting PDF in a program of your choice.[...]
In which way exactly is that different to "printing"? Do you suggest to create PDFs without taking concepts like paper sizes, layouts, colors, text rendering etc. into consideration?
Nobody has printers these days.
#166511 (comment)
It's REALLY about time that you leave your tiny little bubble and get in touch with the real world. :-)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Some while back @strelec raised [Regression] Vscode has a hard dependency on a printing library (CUPS), but does not even offer printing (#166511). I investigated this, and it's because Electron has support for printing. You'll never guess how they do it. They generate HTML and pull the chain of Chrome. |
Can we lock this conversation please? |
Just tried to print some YAML today to review it while I was going to be PC-less temporarily - Ctrl-P doesn't Print. :)
I mean, if you already have most of Chrome under the hood for HTML rendering, JS runtime, etc. - I've heard worse plans, assuming this hasn't been stripped from the VSCode build.
So that was Debian-specific CUPS removal. How does that affect the basic build and other platforms (Windows, specifically, doesn't use CUPS). |
Sure, but I get a lot of "waah I don't wanna use your hacky extension that drives a browser, I want real printing" |
I was a Microsoft Explorer Intern in 2006. We had to take a massive code-base and understand it quickly so that we could (in the matter of a few weeks) integrate the latest .Net framework into this existing project. It was extremely stressful as someone with only a year or two of programming experience however, it was only when I printed about 100 pages of C# code and used a pen and paper in the break-room with my colleague who was also an intern were we able to make a plan of attack and quickly accomplish our goal. Sometimes, it is not a matter of "save the environment" or "no body has printers", it is a matter of a printer is a tool in our toolbox that sometimes we need to use to do our jobs. It was why it was created so many years ago and why Xerox is still a company in existence today. Please reconsider Microsoft. |
Why is installing an extension such a problem?
|
Compromise: Printing is an extension. An official Microsoft extension installed on-demand when navigating to a Print option. Somewhat like VSCode does already when it detects a document type that could be handled by a Marketplace Extension? |
One of the ideal scenarios. |
That behaviour is actually pretty trivial for Microsoft to implement, There's a recommendations mechanism. Source code repos can use it to suggest extensions. There are also "baked-in" recommendations to which you refer. These respond to detected language identifiers, which is how they know to suggest eg the C# tooling. Print applies to damn near everything. What do you think should trigger the suggestion? There is also the issue of differences between the built-in Markdown preview, which is non-optional and impossible to replace with a better one, and printing via a browser the way I do it in the Print extension. They ought to use the same rendering pipeline so that you can expect anything that works in preview to work in print. This is why, despite the point-blank refusal of the vscode team to support an API for the Markdown rendering pipeline, I had to use a hack to access it. Because it's not a supported thing, the fellow responsible for the Markdown rendering pipeline (let's call it the MRP I'm tired of typing that) feels free to change things with no regard to anyone else's needs. I have a quarter of a million users but from his perspective only one person cares about this (me). As a result, the built in MRP is becoming more trouble than it's worth and I'm looking at running my own MRP with common markdown-it extensions baked-in. The problem with this from the user's perspective is it doesn't cater for user driven Markdown extension, and there is drift between the built in preview and printing. The solution is for me to provide both preview and print. This is an improvement on several fronts:
Frankly I'd be very happy about it if MS put me on the payroll to maintain print/preview. But they won't for a variety of reasons. Some extensions need to render in the browser, which means you have to serve script. This introduces security considerations and potential liability. |
Copeeel @memark |
It would be great if Microsoft can consult with @PeterWone to improve this part of VS code if they have not already. |
Where is File->Print? |
Microsoft doesn't want to do Print, and it is not supported for an extension to contribute a menu item to the main menus, only to context menus. The official justification has to do with technical problems in localising dynamic menus. Personally, I find this unlikely. VS Code has handled dynamic menus since day one (the file history) so there must be some other reason they don't want to do it. As for localisation, the fact that you can't do the menus in the Electron start-up phase is irrelevant, a menu is basically a popup window full of buttons. with click events triggering command messages. Get the menu label text from the contributing extension dynamically and there's your localisation, or not, depending on the extension. Don't hold your breath. |
Is this justification public somewhere? |
They seemed to have been able to do it just fine with their other products.
…________________________________
From: Jose Angel Torres ***@***.***>
Sent: Tuesday, October 1, 2024 10:28 PM
To: microsoft/vscode ***@***.***>
Cc: Gregory Dyess ***@***.***>; Mention ***@***.***>
Subject: Re: [microsoft/vscode] Support to print the editor contents (#5953)
The official justification has to do with technical problems in localising dynamic menus.
Is this justification public somewhere?
—
Reply to this email directly, view it on GitHub<#5953 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFCDAI44KPBSMDIKZTJJWQTZZNR7DAVCNFSM4CCIEN6KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMZYG42TKNZWGM3A>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Steps to Reproduce:
Sometimes paper is unbeatable.
The text was updated successfully, but these errors were encountered: