If you want to save web pages to pdf in your browser you can use our browser add-ons. Here are the links:
Google Chrome:
https://chrome.google.com/extensions/detail/kpdjmbiefanbdgnkcikhllpmjnnllbbcFirefox:
https://addons.mozilla.org/en-US/firefox/addon/220850/You need an API library only if you are a developer and want to enhance your application by html to pdf generation capability.