I have been using yed for a while now - I don't think it exports to PDF well (not all elements are editable) BUT it is hierarchical and has some tools for automatically laying out your elements. Overall I have found it to be great for flowcharts and diagramming (atrocious was of default colors aside...) - I liked it more than draw.io when I compared them several years ago.
You can download and use yed for free - I think their business model is that you pay for integration with other tools. It's not open source though.
I'm a long-time yEd user. I think its secret sauce is the incredible time and effort its creators put into its automatic layout algorithms. I have yet to see anything else that matches it in that respect.
In particular, yEd is what I would call critical for quickly generating easily readable dependency diagrams with more than, say, 50 elements. The heirarchical layout supports octilinear edge routing (like subway diagrams), which makes resulting layouts readable even with hundreds or thousands of elements. Also, I have printed out large yEd dependency diagrams on a plotter -- so if you can "print to PDF" (like on a Mac or a recent Windows version), generating a PDF should be simple.
I just counted the number of options available on the
"hierarchical" layout. This isn't a competition, but it does give you an idea of how thoroughly their developers built it: there are 51 configurable options. And in addition to "heirarchical", there are 19 other automatic layout types available, each with their own options.
Additionally, yEd's native file format is graphml, which is an open standard and can be generated programmatically.
You can download and use yed for free - I think their business model is that you pay for integration with other tools. It's not open source though.