HTML to PDF keyword

Hi, I am trying Html to PDF with the following code:

Export The Statement As A PDF
Wait Until Element Is Visible CSS:.customer-statements-report-container
{soa_html}= Get Element Attribute CSS:.customer-statements-report-container outerHTML Html To Pdf {soa_html} {CURDIR}{/}soa.pdf

The PDF output is not as expected.

I am supposed to output the box in blue to PDF:

Hi @yewengehoe. I can look into this issue later today. Really sorry that it has taken this long to answer you…

Try this solution. You might need to tune the img width to match your page size. Tell me how it goes.

Screenshot    locator=CSS:.customer-statements-report-container   filename=statement.png
Html To Pdf  <img src='statement.png' width='480'/>  ${CURDIR}${/}soa.pdf