How to download Html pages to Pdf using aspose.pdf

Hi All,

I have 5 pages of html code, but while converting to pdf i am geeting only one page in pdf format.

Below Code i write:

            string inFile = desPath +"//" + tpObj.Job_ID + "-Validation Analysis.html";
            string outFile = desPath + "//" + tpObj.Job_ID + "-Validation Analysis.pdf";

            Aspose.Pdf.HtmlLoadOptions options = new Aspose.Pdf.HtmlLoadOptions(Path.GetDirectoryName(inFile));                
            options.IsEmbedFonts = false;
            Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(inFile,options);
            pdfDocument.Save(outFile);
            return tpObj.Job_ID + "-Validation Analysis.pdf";

@knr

Please try to use the following CSS property in your HTML to add page break in output PDF after conversion:

page-break-before: always;

In case you still face any issue, please share your sample HTML with us. We will test the scenario in our environment and address it accordingly.