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.

Mon Sep 28, 2020 7:01 am

Spire PDF Issue.zip
We are using spire PDF for one of our client project and we wanted to create a PDF file for one of the reports. This conversion works fine till we have 200 records in the HTML but the moment it reaches to 300 records the converter function does not generate the PDF file. It also does not throw any exception back to the code as well. Here are the more details you may need to recreate the issue at your end.

Our Environment Details.
• Microsoft .Net Core 2.1 with C#
• React Js and Redux
• Spire Office 5.9.2 with suggested plugin

Because of .net core, we are using the standard HTML Converter link with plugins, to generate the pdf.

As per the business need, we are displaying a gird of records in the PDF and the solution works fine till 200 records but as soon as we try to generate a pdf with 300 records, it doesn’t work. Even it does not throw any exception back.

Here is the code we are using to generate a PDF where “viewHtml” is the input html for PDF and “outputFile” is the name with path

Code: Select all
Spire.Pdf.HtmlConverter.Qt.HtmlConverter.Convert(viewHtml,
//File name with path
                    outputFile,
                    //enable javascript
                    true,
                    //load timeout
                    100 * 6000,
                    //page size
                    PdfPageSize.Letter,
                    //page margins
                    new Spire.Pdf.Graphics.PdfMargins(15, 15, 15, 78),
                    //load from content type
                    LoadHtmlType.SourceCode);

The above code works fine until 200 records in the grid but it fails when we pass an html having 300 records.

I have attached following file for a quick review.
1. ViewHtml_100.html and ViewPDF_100.pdf
2. ViewHtml_200.html and ViewPDF_200.pdf
3. ViewHtml_300.html – NO PDF GENERATED and NO EXCEPTION TOO.

Our observation:
There is a load time out parameter in the convert function but it doesn’t seem to be working as expected. For our solution we tried to set it from 30 seconds to 10 minutes but the call never waited more than a minute.

Prashant.Adalja
 
Posts: 7
Joined: Mon Sep 28, 2020 6:33 am

Mon Sep 28, 2020 9:46 am

Hello,

Thanks for your inquiry.
I did an initial test in a similar environment and did reproduce your issue. I have logged it in our bug tracking system with the ticket SPIREPDF-3636 for further invastigation. We will let you know if there is any progress. Sorry for the inconvenience caused.

Sincerely,
Elena
E-iceblue support team
User avatar

Elena.Zhang
 
Posts: 279
Joined: Thu Jul 23, 2020 1:18 am

Mon Sep 28, 2020 12:20 pm

hello Elena,

Thanks for the response on this. I just want to highlight one more point that we are having a spire PDF license. So is there any way we can expedite the process or can you connect us with some direct channel where we can find some workaround. This is little high on priority as our development phase is about to complete and we might need to change the release dates if we can not resolve this on time.

It would be a great help if we can find some other way of generating the PDF instead of the one we used. At present we can not find any way other than using the plugin and only have the HTMLConvert.Convert method.

Thanks in advance.

Regards,
Prashant

Prashant.Adalja
 
Posts: 7
Joined: Mon Sep 28, 2020 6:33 am

Tue Sep 29, 2020 1:58 am

Hello,

Thanks for your feedback.
After further testing, we found an alternative solution. When the “LoadHtmlType” is “URL”, the PDF can be generated successfully. Below is the corresponding code for your reference.
In addition, we don’t find the purchase information related to your registered email. . Could you please provide your Order number or purchase email so that we could record your purchase information? Thanks in advance.
Code: Select all
 Spire.Pdf.HtmlConverter.Qt.HtmlConverter.Convert("ViewHtml_300.html",
            outputFile,
            true,
            //load timeout
            100 * 6000,
            //page size
            PdfPageSize.Letter,
            //page margins
            new Spire.Pdf.Graphics.PdfMargins(15, 15, 15, 78),
            //load from content type
            LoadHtmlType.URL
            );


Sincerely,
Elena
E-iceblue support team
User avatar

Elena.Zhang
 
Posts: 279
Joined: Thu Jul 23, 2020 1:18 am

Tue Sep 29, 2020 9:17 am

Hello Elina,

Thanks for the suggestion. The solution you provided, works fine with 600 records but it failed again with 1200 records. I have attached the html file with 1200 records. Requesting you to add these details in the original ticket for the tracking purpose.

We will provide you the license details soon.

Regards,
Prashant

Prashant.Adalja
 
Posts: 7
Joined: Mon Sep 28, 2020 6:33 am

Tue Sep 29, 2020 9:46 am

Hello,

Thanks for your feedback.
I did an initial test with the latest x64 plugin, but the PDF was successfully generated. Attached is my output PDF. I suggest you try again with the latest plugin.
If the issue persists, please tell us your OS information (E.g. Windows 7, 64 bit) for further investigation. Thanks in advance.

Sincerely,
Elena
E-iceblue support team
User avatar

Elena.Zhang
 
Posts: 279
Joined: Thu Jul 23, 2020 1:18 am

Tue Sep 29, 2020 3:47 pm

Hello Elina,

Unfortunately I am not able to generate the PDF from the same html file and same code. Here is the details of my operating system.
OS Name: Microsoft Windows Server 2012 R2 Standard
OS Version: 6.3.9600 N/A Build 9600
OS Manufacturer: Microsoft Corporation
OS Configuration: Member Server
OS Build Type: Multiprocessor Free
Registered Owner: Windows User
System Manufacturer: VMware, Inc.
System Model: VMware Virtual Platform
System Type: x64-based PC
Processor(s): 8 Processor(s) Installed.
[01]: Intel64 Family 6 Model 26 Stepping 4 GenuineIntel ~2095 Mhz
[02]: Intel64 Family 6 Model 26 Stepping 4 GenuineIntel ~2095 Mhz
[03]: Intel64 Family 6 Model 26 Stepping 4 GenuineIntel ~2095 Mhz
[04]: Intel64 Family 6 Model 26 Stepping 4 GenuineIntel ~2095 Mhz
[05]: Intel64 Family 6 Model 26 Stepping 4 GenuineIntel ~2095 Mhz
[06]: Intel64 Family 6 Model 26 Stepping 4 GenuineIntel ~2095 Mhz
[07]: Intel64 Family 6 Model 26 Stepping 4 GenuineIntel ~2095 Mhz
[08]: Intel64 Family 6 Model 26 Stepping 4 GenuineIntel ~2095 Mhz
BIOS Version: Phoenix Technologies LTD 6.00, 12/12/2018
System Locale: en-us;English (United States)
Input Locale: en-us;English (United States)
Time Zone: (UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi
Total Physical Memory: 8,191 MB

Regards,
Prashant

Prashant.Adalja
 
Posts: 7
Joined: Mon Sep 28, 2020 6:33 am

Wed Sep 30, 2020 9:16 am

Hello,

Thank you for your prompt reply.
I tested your case in a similar environment but still did not reproduce your issue. This is my testing project, you can run it directly on your side.
If your project setup is different from mine, please provide us with your project for further analysis. You could upload it to the DropBox or OneDrive and then share the download link with us. Thanks in advance.

Sincerely,
Elena
E-iceblue support team
User avatar

Elena.Zhang
 
Posts: 279
Joined: Thu Jul 23, 2020 1:18 am

Wed Sep 30, 2020 12:27 pm

Hello Elena,

Unfortunately the code you sent didn't work on my machine for 1200 records, however it worked for 300 records. Not sure what's wrong. By any chance is this code logging any exception anywhere? If so can you please provide the necessary details.

The email id thru which we have purchased the license is - [email protected].

We are also facing the license warning while generating the PDF. Do you want me to open another request in a different thread?

Regards,
Prashant

Prashant.Adalja
 
Posts: 7
Joined: Mon Sep 28, 2020 6:33 am

Thu Oct 01, 2020 9:28 am

Hi Prashant,

Did you test the project(Here is download link: http://www.e-iceblue.com/downloads/demo/22928Demo.zip) provided by Elena on your side? Did it work?
Besides, could you please try other computers? Does all computers have the same issue?

As for license warning issue, we suggest you apply the license by license key.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Sun Oct 04, 2020 4:56 pm

Hello Betsy,

We did test this solution on multiple machines and got different results. On few machines it worked only for 300 records while on other it could process 1200+ records. The max we can process were 2400 records, which was on our development server. However it failed when we try to pass and html with 4800 records there. I have attached an html having 4800 records to test the same at your end.

Regards,
Prashant

Prashant.Adalja
 
Posts: 7
Joined: Mon Sep 28, 2020 6:33 am

Mon Oct 05, 2020 4:16 am

Dear Prashant,

Thanks for your feedback.
It is strange that different machines got different results on your side, you could compare the differences between different machines. Besides, our plugin method is based on the Qt plugin of the Chrome kernel, you could open your html in Chrome browser and check if it has complete records in print preview mode.
As now we are on National Day holidays, we will conduct further investigations on your issue and give you a feedback once we back to office on 09/10/2020. Sorry for the inconvenience caused and thanks for your understanding.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Fri Oct 09, 2020 8:26 am

Hi Prashant,

Thanks for your patient waiting.
I did tests on several machines, but none of them could generate PDF document. I have logged this issue into our bug tracking system with ticket number SPIREPDF-3655, our Dev team will look into it, if the issue is fixed or there is any update for you, I will infrom you immediately. Apologize for the inconvenience caused.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Mon Oct 12, 2020 3:53 pm

Hello Nina,

Thanks for the heads-up. I will wait for a positive response from your DEV team.

Regards,
Prashant

Prashant.Adalja
 
Posts: 7
Joined: Mon Sep 28, 2020 6:33 am

Return to Spire.PDF