This should be fairly easy. Create a new workflow as an action extension. This will allow you to use the share functionality
My pdf workflow has only 2 steps
- Make PDF
- Quick look
When I use it, I can highlight text and then press share. I select run workflow, select the make pdf workflow and voila you get a pdf with the ability to share it to another app
