Missing page numbers in input-data
-
Hi!
Please help with the problem that I have missing page numbers when I try to get data from JS.
In this only 3 variables (__appDirectory, __rootDirectory, __parentModuleDirectory) that are not interesting to me. But I do not find input-data.Perhaps you can look at my example and tell me what I'm doing wrong?
-
Hi,
you use
{{pageNumber}}
but you should use<span class='pageNumber'/>
for the native headers.See docs and example
https://jsreport.net/learn/chrome-pdf#native-headers-and-footers
https://github.com/jsreport/jsreport-dotnet-example-webapp/blob/master/Views/Home/Header.cshtml
-
Thanks for the answer, I know about this method.
But the point is that I need to do multi-page PDF, with custom headers, depending on the content on the page. I tried to usepdfAddPageItem
andpdfCreatePagesGroup
, but since the scripts do not have access tothis.$pdf
, I cannot transfer anything to a header/footer.
My example above was the first step in this direction.
-
Ok. You want to use the pdf-utils exension.
Here you can find the .net example
https://github.com/jsreport/jsreport-pdf-utils/issues/12#issuecomment-428584744However I would recommend to read through the docs and try provided examples for the start to get how it works as this is quite more advanced.
I think it is usually better to start with jsreport studio and afterwards try to translate it into .net if you need the embedded .net integration.