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

Free Support Forum - aspose.com

Problem with HTML-Format inside PDF

Hello,

is it possible to define a margin after a
in a pdf-file?

Thanks and Regards,
Michael


Hi Michael,

Your query seems to be incomplete or it's not properly being displayed. If your are converting the HTML-file, you may share it for testing purpose.

Hi,

here's an example:

Das ist ein Test.


Absatz1



Absatz doppelt:http://www.google.de/">doppelt:</p>


  • direkte

  • Auflistung



In HTML there's a little space between the

, but in a generated pdf not. Is this something, that can be configured?

Regards,
Michael

Hi Michael,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the Html code.

I tested your issue and I did not find a difference between the HTML and the generated PDF document. I have attached the generated file for your reference. Please share the PDF file you have generated to show the issue. This will help us figure out the issue soon.

Thank You & Best Regards,

Hi,

thank you for your answer. If you take this code:

Dim contenttext As String =

"

This is a test paragraph

and this the second paragraph

"

Dim font_name As String = "Arial"

Dim pdf As New Generator.Pdf()

Dim sec1 As Aspose.Pdf.Generator.Section = pdf.Sections.Add()

'Größenangaben in pt, 1pt=0,35mm

'Seitenränder 56pt=20mm=2cm

sec1.PageInfo.Margin.Left = 56

sec1.PageInfo.Margin.Top = 56

sec1.PageInfo.Margin.Right = 56

sec1.PageInfo.Margin.Bottom = 56

Dim text1_c As New Generator.Text("
" & contenttext)

text1_c.IsHtmlTagSupported = True

text1_c.TextInfo.FontName = font_name

sec1.Paragraphs.Add(text1_c)

Dim fileBytes As Byte() = pdf.GetBuffer()

you'll get the attachet pdf, without any margins. Is it possible to define margins (for example for

  • , too?

    Regards,

    Michael

Hi Michael,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the sample code and resultant file.

Please download and try the latest version of Aspose.Pdf for .NET 6.4.2 as it works fine with your sample code (resultant file attached).

Thank You & Best Regards,