Free Support Forum -

Background not spanning multiple pages


I am using the Aspose.PDF dll to convert a form on a Webpage to PDF. If an element if split across multiple pages the background colour is not taken across on some occasions, but on others it is. (Please see pictures)Aspose.1.PNG (18.6 KB)Aspose.2.PNG (27.5 KB)



Thank you for contacting support.

Would you please share source and generated ZIP files along with narrowed down code snippet so that we may try to reproduce and investigate it in our environment. Please ensure using Aspose.PDF for .NET 19.1 before sharing requested data.

#3 (35.8 KB)

Thank you for getting back to me so quick, attached is what you requested, please let me know if you require anything else.



Thank you for sharing requested data.

We have used below code snippet with Aspose.PDF for .NET 19.1 and generated PDF file has been attached for your kind reference. Please mention page number and text where you notice the problem as compared to source HTML file, along with screenshots so that we may investigate further to help you out.


//Pass basepath as parameter
HtmlLoadOptions options = new HtmlLoadOptions(dataDir);
options.PageInfo.Margin = new MarginInfo(0, 10, 0, 10);
options.PageInfo.IsLandscape = false;
Document pdfDocument = new Document(dataDir + "7812.htm", options);
pdfDocument.Save(dataDir + "7812.pdf");


Hi Farhan

Sorry in the delay getting back.

The background on page 1-2 doesn’t span across (see screenshot1)Screenshot1.PNG (7.3 KB)

Also the background on page 2-3 this doesn’t cover all the text and spans on to the next page and leaves a big gap (see screenshot2) Screenshot2.PNG (7.5 KB)

and again on page 13 -14 (see screenshot 4) Screenshot4.PNG (7.7 KB)

This works perfectly on pages 10 - 11 (see screenshot3)
Screenshot3.PNG (9.2 KB)