One of the pdn article says 'Convert data in clipboard to html stream'. The data on clipboard is a base64 decoded stream of a pdf document. This needs to be passed to the HTMLToPDF activity to generate pdf. How may I convert string to html stream?
Pega provides a step method Property-Set-HTML to convert a section content into HTML stream. In the section put your property containing string value and execute that step method on your current primary page.
Next, call the HTMLToPDF activity and pass the MarkUp parameter as your HTML stream obtained in previous step.