Discussion
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
United Health Group
IN
Last activity: 17 Apr 2015 7:15 EDT
Converting section to PDF
I have a section, where onclicking of a button I need to open it in PDF fromat, any one please suggest ideas on it,
I saw options where they used HTMLToPDF whic requires a HTML rule.Is ther any othe way?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Virtusa Inc
US
hi
HTMLTOPDF is the simple OOTB way.Include the section inside a Obj HTML and pass it as the param for the HTMLTOPDF activity.
thanks
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
United Health Group
IN
can you provide the HTMl needed, I am not good at HTML
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Cognizant
IN
Create HMTL fragment and include the section to be displayed inside the jsp tag in similar way mentioned below -
<pega:include name="SectionName" type="Rule-HTML-Section"/>
Use this HTML as param for HTMLTOPDF activity.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
igate
IN
Hi,
I am new to Pega
Can you please show me how can we use this html.
I have created the HTML fragment like below
<pega:include name=ApprovalForm type=Rule-HTML-Section/>
I have seen three parameters in HTMLTOPDF activity
MarkUp
StreamName
Pdfdocument:
And where we can find the output PDF(Location)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Virtusa Inc
US
The output is a object reference. you can use the VIEW activity to see the generated PDF or attach it directly to the work object with ".pdf" extension.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
igate
IN
Hi Thanks for your Quick response. May I able to see the the pdf documnet in my pc? If possible may I know which location it is?
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Virtusa Inc
US
yes, while you use the view activity it will prompt you anyways whether to save the pdf locally or open.
![](https://accounts.pega.com/sites/default/files/pega-user-image/31/REG-31385.png?source=PUMINIT)
![](https://accounts.pega.com/sites/default/files/pega-user-image/31/REG-31385.png?source=PUMINIT)
Total System Services
US
Hi
Extending to the above
I have a requirement to generate PDF from the User input via a section. I have customized the GeneratePDF activity, and added CSS to generate the PDF as per the req. Now, I want the file to be opened in a print Window(like the Print Action) or window.print(); instead of getting a dialog to open/Save. Is there any suggestion other than writing a custom control?