First we have to create Advance Smart Object , Check my previous Article how to create PDF Converter Advance Smart Object.
You can see my Previous article
How to generate Smart Forms in K2 for SharePoint list
Create Workflow using K2 designer , In the workflow wizard ,
drag our “PDF Converter” under
Advance Smart Object.
It will open “Create PDF from URL” Wizard, Click “Next”
Now we have to configure Outcomes. Add Outcome “Send” &
Linked to “Send E-mail”. Click “Next”
We have to provide the input properties for the PDF File.
URL String: http://www.dotnetsharepoint.com/Runtime/Runtime/View/PDFView?Paramemployee=#ID (Runtime URL for the view or list whatever
we have to show & map with parameter as shown in below figure.)
Smart Object Name: PDFFile
Smart Object Method: Create
Smart Object File
Property: PDF
ID Property Name: ID
File Name: Employee PDF (Enter File Name what you want)
Page Size: A4
Page Orientation: Portrait
Click “Next”, we have to map Data Fields ID to ID Property
value as shown in below figure. (Create new ID using String data field.)
Click “Finish”. Now drag “Send E-mail” to send outcome.
It will open Wizard, click “Next”
Now map “PDF Smart Object”
to attachments. As shown in Figure below.
It will open PDF wizard, map “To Integer (Value)” from Inline
Function to ID. As shown in figure below.
Finally map “Data Field Id” to “To Integer (Value)” as shown
in below figure.
Save & Deploy the workflow.
Run the Form and capture the required details then click the
save button.
The E-mail is sent to the recipient with the PDF attached. Reference: http://help.k2.com/onlinehelp/k2smartforms/userguide/1.0.4/webframe.html#pdf_converter_service_broker.html