Question
Evonsys
US
Last activity: 3 Feb 2016 5:11 EST
How to convert a correpondence rule to a pdf?
Hi,
Is there a way to convert a correspondence rule to a pdf? (Covert corr rule to a pdf?)
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Virtusa
IN
HI Thaveesha,
To convert the Correspondence rule to PDF, first you need to convert the correspondence to a HTML, so that the HTML can be converted to PDF.
The output of the property-set-correspondence should be framed as a html ( read the outputfromcorr from clip board page, use appendString(outputfromcorr) in Html stream.)
Later the output of the property-set-html can be used as the input to HtmltoPDf.
Thanks.
Pegasystems Inc.
IN
would creating the correspondence rule in HTML and sending it to RULE-OBJ-ACTIVITY @BASECLASS HTMLTOPDF works?
Evonsys
US
yes it would, but how do you convert correspondence rule to html? any activity?
Updated: 3 Feb 2016 2:53 EST
Virtusa
IN
Hi Thaveesha,
You can use the combination of Property-Set-Correspondence and Property-set-HTML to achieve the above mentioned. (Use an HTML stream to convert the Property to HTML using property set HTML)
Reach back is any further informations required.
Following you can use the HTMLtoPDF in the base class to convert it to PDF file.
Thanks.
Evonsys
US
Hi,
The Property-Set-HTML can only be used to convert an HTML stream to a property? it should be other way around, i need to convert the property to html.( so this can be used in HTMLTOPDF activity) Is there a way to do this?
Accepted Solution
Virtusa
IN
HI Thaveesha,
To convert the Correspondence rule to PDF, first you need to convert the correspondence to a HTML, so that the HTML can be converted to PDF.
The output of the property-set-correspondence should be framed as a html ( read the outputfromcorr from clip board page, use appendString(outputfromcorr) in Html stream.)
Later the output of the property-set-html can be used as the input to HtmltoPDf.
Thanks.
Virtusa Global IT Services Company
AU
Hi Thaveesa,
Using Property-Set-Corr method, convert the correspondence to a property.
Using HTML rule, convert the property value to HTML code.
Using HTMLTOPDF(available in @bascalass) activity convert the HTML to PDF.
Hope this helps!!
Regards,
Ramki
Evonsys
US
Hi Ramakrishnan,
Can you please explain the below step?
"Using HTML rule, convert the property value to HTML code."
Updated: 3 Feb 2016 3:12 EST
Virtusa Global IT Services Company
AU
Hi Thaveesha,
Please Create HTML Rule and write a java code to convert the Property value to HTML.
Using Property-Set-HTML method, pass the parameter as new property to store the HTML and the HTML rule.
Pass this property as parameter to HTMLTOPDF activity.
Regards,
Ramki
Evonsys
US
Hi Ramakrishnan,
"write a java code to convert the Property value to HTML."
How can i write a java code to this according to pega? is there any references i could use?
Updated: 3 Feb 2016 5:11 EST
Virtusa Global IT Services Company
AU
Hi Thaveesha,
Read the property from clipboard page and use the appendString() method to append the value in the HTML rule.
May be the below link will be useful.
https://community.pega.com/sites/default/files/help_v62/procomhelpmain.htm
Pegasystems Inc.
US
If your requirement is write something from clipboard to PDF and email it then you can create a section and include this in a HTML and pass it to pyAttachAsPDF activity. This will convert section into a PDF and attach it to work object. With a proper attachment category defined, you can easily email this attachment.
Ex html:
<link rel="stylesheet" type="text/css" href="webwb/XXXXXXPDF.css">
<pega:include name="YourSectionName" type="Rule-HTML-Section"/>