Generate PDF from sections and styling it
hi everyone,
I'm trying to generate a document using the sections used in a workflow. It has many number of fields that mapping them individually is not a feasible option.
Because of this Create PDF shape was not able to be used, and instead I tried using HTMLtoPDF activity and Pega component "Document Content Engine" (which also generates the doc through HTMLtoPDF).
The issue is although I could apply most of the styles with a CSS file and with the use of Pega out of the box copmpactstylesforPDF, I could not find a way to apply styles for text fields. They are always returning with around 30% of the page size.
The only option that worked for me is to define the style in paragraph rule itself which contains the sections that needs to be in the PDF. Since this is not an optimal way, has someone come across this situation and was able to get a solution for this?
What I tried to do was to apply styles to text fields, therefore I used below CSS:
input[type="text"]{
width=200px; etc etc.
}
When I use this in a CSS file and call it as a link href it is not getting picked up. But when I added that into the paragraph rule itself, it's picking up the style correctly.