Yes it works. Thank you very much
hkosmidi
@hkosmidi
Posts made by hkosmidi
-
Omit header in first page
I have added a header/footer in my template with certain text, but I don't want it to appear in the first page. The first page will be something like a front page with logo, etc.
Is it possible?Thanks
-
external css doesn't seem to load on published server
I use a template where I have:
<head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> </head>
while in my development environment I see the bootstrap stripped tables correctly, when I publish to production, pdf is shown but table (or col-xs- columns) seems not to have been formatted.
I load jsreport as:
var rs = new LocalReporting(). RunInDirectory(directory). Configure(cfg => cfg.AllowLocalFilesAccess().FileSystemStore().BaseUrlAsWorkingDirectory()); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) rs.UseBinary(jsreport.Binary.JsReportBinary.GetBinary()); else rs.UseBinary(jsreport.Binary.Linux.JsReportBinary.GetBinary()); // var service = rs.AsWebServer().RedirectOutputToConsole().Create(); return await service.StartAsync();
Any help? Thanks
-
RE: How do you select your recipe in .net local configuration?
ok got that. I wanted to see phantom-pdf settings because I have a strage behavior.
In different developing environments (some windows machines, one linux, with different node versions) we have different pdf renders.
How is that possible? I have read differences between windows and linux. But in two windows OS with different node? -
How do you select your recipe in .net local configuration?
I start jsReport like this:
var directory = Path.Combine(AppContext.BaseDirectory, "jsreport"); var dir = AppContext.BaseDirectory; var rs = new LocalReporting(). RunInDirectory(directory). Configure(cfg => cfg.AllowLocalFilesAccess().FileSystemStore().BaseUrlAsWorkingDirectory()); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) rs.UseBinary(jsreport.Binary.JsReportBinary.GetBinary()); else rs.UseBinary(jsreport.Binary.Linux.JsReportBinary.GetBinary()); // var service = rs.AsWebServer().RedirectOutputToConsole().Create(); await service.StartAsync();
How can I configure phatom-pdf as described here? https://jsreport.net/learn/phantom-pdf
-
RE: RenderByNameAsync works locally but not on server
Ok so I think I figured out what was going on. I forgot to install to this particular docker image the libfontconfig. Running the code as web server produced the debug logs to understand what was going on. Shouldn't the same log be outputed somehow when ran as Localprovider?
thanks
-
RE: RenderByNameAsync works locally but not on server
Yes build did copied the templates. I could run it locally on my windows 10, but not on my linux box which I tried some hours ago.
If I start it as webserver, how do I render the template? Shouldn't I change the code? -
RenderByNameAsync works locally but not on server
I have installed jsreport.Local to a .net core application to render some pdfs. I can't find any decent help on how the folder structure in jsreport/ should be so I played around a lot.
What I do is:var directory = Path.Combine(AppContext.BaseDirectory, "jsreport"); var rs = new LocalReporting(). RunInDirectory(directory). Configure(cfg => cfg.AllowLocalFilesAccess().FileSystemStore().BaseUrlAsWorkingDirectory()); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) rs.UseBinary(jsreport.Binary.JsReportBinary.GetBinary()); else rs.UseBinary(jsreport.Binary.Linux.JsReportBinary.GetBinary()); return rs.AsUtility().Create();
When I tried to render a simple inline template with RenderAsync it worked both on windows 10 locally, and in my linuc docker images.
But this
var report = await rs.RenderByNameAsync("RoutinesSubject", reportData);
fails with error:jsreport.Local.JsReportBinaryException
Error rendering report: rendering has finished with errors:Error during rendering report: Unable to find specified template or user doesnt have permissions to read it: TempateName
jsreport.Local.JsReportBinaryException: Error rendering report: rendering has finished with errors:Error during rendering report: Unable to find specified template or user doesnt have permissions to read it: RoutinesSubject
at jsreport.Local.Internal.LocalUtilityReportingService.<RenderAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()Is there a way to debug it? jsreport exists on server with it's structure.