Hi Romana,
Thank you for your update.
As we said earlier, we are suggested you change the size (height) of the image referred to in an HTML file to avoid the image split issue. If the image size (referred to in that HTML page) is larger than the PDF page height, that image will split to the next page. This is the default behavior of HTML to PDF converter, we could not resize the image to fit inside the page So that we could not handle this on our end.
If the HTML page is responsive or adjustable content, we can adjust the HTML content size in the PDF document by using viewport size. We have tried with different viewport size (3072, 0) on our end, the pdf document will generate properly. Based on the provided size, the content will be scaled in the PDF document. Please try the below viewport settings in your sample and let me know the result.
//Set viewport size
settings.WebKitViewPort = new System.Drawing.Size(3072, 0); |
Note: If the HTML page is not responsive content, this viewport suggestion will not work in that case. So you have to change the image size (height) in the HTML file itself.
Regards,
Gowthamraj K