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

Free Support Forum - aspose.com

HTML to PDF conversion - set pdf page size to one page

@shif

We understand your concerns. We request you to please share a sample HTML that has custom fonts references inside it. We did not face any issue while converting the HTML into PDF which you have shared in this forum thread so far.

Please share a sample HTML that has custom fonts references so that we can perform detailed testing on it and share our feedback with you accordingly.

Could you please try the code below to convert the html file I sent you.
The file does not have custom fonts and I’d like to add them after this converts correctly.
When I run the code, the PDF layout is not good.
Can you send me the output if it is correct. If not, can you send me the code that will convert it.
The code should include ‘doc.DisableFontLicenseVerifications = True’, so I can add custom fonts.

Dim doc As Aspose.Pdf.Document = New Aspose.Pdf.Document()
doc.DisableFontLicenseVerifications = True
Dim currpage As Page = doc.Pages.Add()
Dim htmlFrag1 As HtmlFragment = New HtmlFragment(File.ReadAllText(newhtmlfileOutOfProject))
currpage.Paragraphs.Add(htmlFrag1)
doc.Save(strDestinationFilePDF)

Thank you

@shif

We were able to notice that using the above code snippet, the layout of the output PDF was not correct. An issue as PDFNET-50216 has been logged in our issue tracking system for the sake of correction. We will look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.

We are sorry for the inconvenience.