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

Certificate level 1: Html to PDF

Only names can be added.

Hi! Thanks for reporting. There is this issue that will get fixed sometime in the future:

1 Like

The PDF file is still wrong if I run the ready-made robot from the Beginners’ Course.

FYI: The PDF generation should work better now.