Dynamic removal of {Display: Block }Style tags from HTML stream
I have a requirement where I need to convert incoming SOAP response - having HTML stream to get converted to PDF and attach that PDF to Work object. Every thing is done but the images appear in the stream are NOT getting displayed in PDF form as I am using HTMLtoPDF OOTB activity to get the PDF.
I find out the root cause - the incoming stream having some { Display:Block } tags available in <Style > ( Code below)
<style>
@media (max-width: 480px)
{
table {width:100%;}
img {max-width:100%; height: auto;}
table.EX_RESPONSIVE_TABLE {display:block;}
table.EX_RESPONSIVE_TABLE > tbody {display:block;}
table.EX_RESPONSIVE_TABLE > tbody > tr {display:block;}
table.EX_RESPONSIVE_TABLE > tbody > tr > th {display:block;}
table.EX_RESPONSIVE_TABLE > tbody > tr > td {display:block;}
table.EX_RESPONSIVE_TABLE table {table-layout: auto !important;}
.EX_RESPONSIVE_HIDE_CELL {display:none !important;}
}
</style>
which causing this issue, but the system can not send response without these display :block tags . So inside Pega I need to some how remove these block tags from the HTML stream . I have tried putting this to property and remove from property. not working .
Any idea how to remove that dynamically from HTML stream ? or any code snippet for reference ?