Visual Studio: export C # code to a PDF file and save formatting + colors?

I was wondering if there is any export function inside Visual Studio Ultimate (2010) to get the selected tab (default is one class ) C# code exported to a PDF file, so you can share this PDF file and show it to someone code with formatting and colors in Visual Studio? I am posting a pdf with sample code for an application since I came up with this question.

I know that I can copy code in Word into a text field that works fine and retains colors + formatting. I'm just wondering if there is an option in Visual Studio too? It doesn’t matter, I just want to know .; -)

+6
source share
4 answers

This is a job for CutePDF . Just install it and go to file-> print in Visual Studio.

+4
source

First you need a tool for printing in PDF format, for example:

I am using Visual Studio 2013, but the colors did not print.

If you are using Visual Studio 2010-2012 , you can check out the following extension from Microsoft: Color printing

If you are using Visual Studio 2013 , you can check out this extension from Microsoft, which includes color printing: Power Tools 2013 Performance

If you are using Visual Studio 2015 , you can check out this extension from Microsoft, which includes color printing: Power Tools 2015 Performance

+1
source

You can use the VscodePrint extension. Google "VScodePrint" and try. You can print or export to PDF any part of the solution.

0
source

I wanted to do it myself, so Google brought me here. Then I had a mini-brain wave, and I remembered "Microsoft Print to PDF", which is built as an option in the print menu. I tried and it worked!

So just go to File-> Print, then select Microsoft Print to PDF as your printer, then choose a location to save your printout. enter image description here

(PS My code is terrible. This file is taken from an old application that I wrote lazily and intend to review)

0
source

Source: https://habr.com/ru/post/948343/


All Articles