Convert specific html div to pdf without knowing the element ID

I want to convert a part of an html text to PDF. I want to convert specific div instead of the whole page. The element has no ID.  This is a receipt html template. How to achieve that purpose using xpath or other?

1 Reply 1 reply marked as answer

GK Gowthamraj Kumar Syncfusion Team February 22, 2021 12:31 PM UTC

Hi Ramzi, 

Thank you for using Syncfusion products. 

We have support for converting partial HTML to PDF using WebKit/Blink rendering engine in our HTML to PDF converter. We can convert a particular image, table, or div element as a PDF document instead of providing a whole HTML string, and then we have to parse a particular HTML element by specifying the element ID. We do not have support for converting partial HTML to pdf by specifying the XPath. We could not proceed further on this.   
  
Please refer to the below UG link for partial HTML to PDF,   
  
Please let us know if you need any further assistance with this. 

Regards, 
Gowthamraj K 


Marked as answer
Loader.
Up arrow icon