We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Displaying the paragraph content (sent by HTMLFragment) without any gaps in PDF in Vb.net

Hello Aspose,

I am using latest version 9.8.0 of Aspose.Pdf for .Net.

I am generating PDF by sending HTML content to VB.net thorugh HTMLFragment.

This HTMLFragment value is being passed to Paragraph.Add() method.

Like that I am sending 3 HTML contents to HTMLFragment and then passing to Paragraph.Add() method.

Issue is,

Each Paragraph.Add() method is displaying the content in New page of PDF. Content will take only half of the page. But here it is taking 3 pages (as I am passing 3 HTML contents) by displaying half blank area in each page.

v_HTML =""


v_HTML2=""Dim title As HtmlFragment = New HtmlFragment(v_HTML)

Dim title1 As HtmlFragment = New HtmlFragment(v_HTML1)

Dim title2 As HtmlFragment = New HtmlFragment(v_HTML2)




>> I want to display the content continuously without any blank area. Second Paragraph should start where the First Paragraph ends. It should not start from new page. So as per my requirement it should display the total content in one & half page of two pages.

>> Is there any specific function or method to achieve this?

>> I used below properties (of BaseParagraph) but there is no effect.




Please help me. Thanks in advance.

--Dinesh R

Hi Dinesh,

Thanks for your inquiry. I have tested the scenario with Aspose.Pdf for .NET 9.8.0. but unable to to replicate the issue. We will appreciate it if you please share your sample html text as well, so we will test the scenario and will provide you more information accordingly.

Dim pdfDoc As New Document()<o:p></o:p>

Dim page As Page = pdfDoc.Pages.Add()<o:p></o:p>

Dim html As [String] = “<fontsize=10>Table<o:p></o:p>

Dim html1 As [String] = “<fontsize=10>Table<o:p></o:p>

Dim html2 As [String] = “<fontsize=10>Table<o:p></o:p>

Dim title As HtmlFragment = New

Dim title1 As HtmlFragment = New

Dim title2 As HtmlFragment = New




pdfDoc.Save(myDir + “multiplehtmlfragment.pdf”)<o:p></o:p>

We are sorry for the inconvenience caused.

Best Regards,