Section embedded in paragraph rule for generating PDF doesnot get same formatting of section

Below are the steps to generate a Pdf where we will embed a section as input , and to get exact UI formatting of section in PDF.

Create a HTML rule as below


<pega:include name="sectionxxxx" type="Rule-HTML-Section" />

<br />

  <pega:include name="sectionyyy" type="Rule-HTML-Section" />

<br />

  <pega:include name="sectionzzz" type="Rule-HTML-Section" />

  

</head>
this gives exact styling in pdf as in section.

Now create a activity

step -1 property set

Param.FileName=“yyyy.pdf”

step -2 call pyViewAsPDF

HTMLSTREAM=above html rule name

PDFName= Param.filename

Now call it in section on any button with on click open url in new window-give activity name

window name parameter should be as “_self” (Quotes not required).