Error generating more than 500 pages in PDF
-
Hi,
I'm trying to generate a pdf with more than 500 pages with some Charts , and I'm getting HPE_HEADER_OVERFLOW error. Is there any way to increase the limit which can be configurable ? I want to generate pdf which can have more than 1000 pages.
Thanks.
-
in that scenario you should try changing the configuration for the recipe that you are using (strategy, timeout and number of workers), for example for phantomjs recipe you can tweak some options in your jsreport configuration, the relevant options for your case are
phantom.strategy
,phantom.numberOfWorkers
,phantom.timeout
, and if that it is not enough you can do the same with thetasks
configuration (tasks.strategy
,tasks.numberOfWorkers
,tasks.timeout
)also here are some other comments about how to configure jsreport for best performance.
-
The error HPE_HEADER_OVERFLOW seems to be a nodejs error returned if you make a http call and the headers are bigger than 80Kb. I'm not aware about situation when jsreport would use such headers at any place. Are you sure the error doesn't come from your code?
We will definitely need some more information from you to be able to help. Please try to elaborate and give us some more insights. Thank you.
-
maybe you are doing some request to an external service in a script (maybe to get the data?), probably that service is returning big headers or maybe something is happening similar to the linked stackoverflow question (issue with
Content-Encoding
)
-
I'm trying to evaluate js report for one of our requirements where we have to generate large pdf files in some cases even a file with 30,000 .
I'm using .NET sdk and just modified Invoice template to genarte a lasrge pdf with 1000 pages.
var report = await rs.RenderByNameAsync("Invoice", Getdata(i));
yes, the error is from nodejs . wondering is there any config variable in your library to increase the limit.
-
Ok. Thank you. I was able to replicate this issue in the .NET SDK. I will look into it.
This issue likely pops up just when jsreport runs from the compiled
jsreport.exe
which is part of the .NET sdk.
You may play with the full jsreport in the meantime if you want.
-
Any update on the error?
Also, I have another issue I'm using the jsreport as webserver to create new templates as shown in the example below
jsreport.binary and jsreport.local nugets.
'm getting the following error, where do I set this value ? Should I set the value in the dev.config file in packages\jsreport.Embedded.1.0.3\tools\jsreport\app folder?"Error occured - Error during rendering report: Unsupported module in scripts: http. To enable require on particular module, you need to update the configuration as {"scripts": { "allowedModules": ["http"] } } ... Alternatively you can also set "" to allowedModules to enable everything
Stak - Error: Unsupported module in scripts: http. To enable require on particular module, you need to update the configuration as {"scripts": { "allowedModules": ["http"] } } ... Alternatively you can also set "" to allowedModules to enable everything"
-
Any update on the error?
We are working on the fix. The real problem is that your template write too many
console.log
messages to the output. We just need to cut it if it goes about a certain limit. The solution for you at this moment to just remove someconsole.log
writes from your template. In the sample template just disable this lineconsole.log('Calculating item ' + i.name + '; you should see this message in debug run')
-
"Error occured - Error during rendering report: Unsupported module in scripts: http.
Please update
jsreport.Types
nuget package to 1.8.4 and use the following to enable local modules requirevar rs = new LocalReporting() .Configure(cfg => cfg.AllowLocalFilesAccess())