Library for drawing musical notes
Use MusicXML. There is C++ binding.
Rosegarden can export MusicXML to PDF or PS.
You will definitely want to look into Lilypond, widely acknowledged as the best choice for musical typesetting. It's open-source and has all kinds of output formats, and is highly scriptable. It would be pretty easy to write your own C# wrapper around it. Example output:
(source: lilypond.org)