Home > Back-end >  Export C# Solution to PDF
Export C# Solution to PDF

Time:03-29

I have to generate my whole Project as a PDF-File (every class has to be included).

The only was I found was to Print every Class as one PDF with the Visual Studio built-in Print function.

Is there an easier Solution?

I don't want to do this I have to do this s**t

CodePudding user response:

You can use this bash command from the top directory: (works even on Windows if you have WSL installed)

(case sensitive)

cat `find . -type f -name '*.cs'` >> concat.txt

Or Windows powershell equivalent (not case-sensitive):

get-childItem . -Recurse -Filter *.cs | get-content | set-content concat.txt

Then you'll have all your files as one concat.txt, and you can print it with your favorite editor.

If you need to automate this process, there are command line pdf generator, but I'm not sure if this is what you want.

  • Related