Please see the link included below.
QPdfWriter in its current form only rasterizes content. There should be clickable links and such in generated documents. PhantomJS uses QPdfWriter internally, so Qt plus PhantomJS users are out in the cold.
they already have code:
This is a request to merge the code into Qt proper.