Diagram export as PDF

Guys,

I know there has been a lot of questions regarding export a diagram to .pdf and is usually third party libraries. do you guys have any advice or new knowledge as of June 2020 on getting this done?

Thanks

It does depend on external libraries, but have you seen this sample?

The code is at projects/pdf, or on GitHub at GoJS/projects/pdf at master · NorthwoodsSoftware/GoJS · GitHub,

Yes. trying to get it to work. Thanks