Generating PDF Partially with Aspose.PDF

Hello Team,

We are seeing that some html files content is missing in the output PDF. It is not fully exported into output PDF. You can see some part of Reference section is missing in the output PDF.

We even tried with the latest versions (24.4.0/24.3.0) of Aspose.PDF.Drawing, but no luck.

We also tried with downgrade version (23.4.0), but no luck.

I have attached the input html and output pdf files here.
example.zip (1.2 MB)

Could you please check and advise to fix it?

Regards,
Prashant

Also, please find the attached stylesheet(CSS) file.
article_style.zip (10.0 KB)

@pps2794
Could you also provide the code you’re using, please?

@ilya.zhuykov
Application written in C# (.NET 6)
Env: Clound Foundary (Linux based container)
Code:
try
{
Aspose.Pdf.License license = new Aspose.Pdf.License();
string licensepath = AppContext.BaseDirectory + “Aspose.Total.NET.lic”;
inputFile = $“{Constants.HEADERTEXT} {inputFile}”;
license.SetLicense(licensepath);
FontRepository.Sources.Add(new FolderFontSource(AppContext.BaseDirectory));
byte[] byteArray = Encoding.ASCII.GetBytes(inputFile);
using (MemoryStream stream = new MemoryStream(byteArray))
{
// Set page size A3 and Landscape orientation;
HtmlLoadOptions options = new HtmlLoadOptions()
{
PageInfo = { Width = 1200, Height = 1191, IsLandscape = true }
};

		using (Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(stream, options))
		{
			pdfDocument.Save(outputFile);
		}
}
break; // success!

}
catch(Exception ex)
{
Console.WriteLine($“GeneratePDF: Failed, inputFile={inputFile} Attempt={retry}, error= {ex.ToString()}”);
}

@pps2794
In your code css file usage is absent
How do you apply it do PDF document?
I tried your variant, the result document seems to be correctly converted but lacks style application, seems that there could be something wrong with that
example.pdf (1.4 MB)

@ilya.zhuykov In order to apply styles, you need to keep both html and style file the same folder as it linked like below in the input html file:

@pps2794 , thank you, I’ll try with you suggestion

@pps2794
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-57082

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

I replicated issue, for now I found no workaround
I added new task for development team, I’ll contact you in case I find some workaround solution