Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Thu Dec 11, 2014 2:53 am

I am building reports converting from html to pdf using your library.
I am using .net with the lastest build of spire.PDF from nuget.
I use this code to convert. However, sometimes the library just result in a blank page, or a page with the text "black" in the top left corner. I hope you guy can help me fix it soon.

In the code below, "html" is a sting var containing html source code.

Code: Select all
            var doc = new PdfDocument();
            var htmlLayoutFormat = new PdfHtmlLayoutFormat {IsWaiting = true};
            var setting = new PdfPageSettings {Size = PdfPageSize.A4};
           
            var thread = new Thread(() =>
            {
                doc.LoadFromHTML(html, false, setting, htmlLayoutFormat);
            });
            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
            thread.Join();

datsaudoi1
 
Posts: 1
Joined: Thu Dec 11, 2014 2:46 am

Thu Dec 11, 2014 6:14 am

Dear dkmallott,

Thanks for your inquiry.

To help us reproduce this issue, please upload your html file or html source code, or you can send them to burning.liu@e-iceblue.com.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.PDF