hi @AqMa, it always depends on the layout of the template but perhaps in your case adding a pdf marging at the top and bottom can be the solution.

BORIS MATOS MORILLO
@bjrmatos
Posts made by bjrmatos
-
RE: data margin on the page
-
RE: docxRaw - Please Provide Working example
hi @benben-user
your example does not work because right now receiving the value directly as
xml="<xml here>"
is not supported (i see it is described in the docs with an inline example but there is a lack of support for it). a workaround is to instead pass the xml from a value from your data likexml=xmlRaw
. check this working example -
RE: Nested #each loops in xlsx recipe
this is not supported at the moment, i've opened issue, you can subscribe there for updates about when this gets implemented
-
RE: How to create common script file in jsreport if same script file is referring in multiple templates?
hi @reshmajacob93 yes, the case you are describing is better solved by creating a module and reusing it by import it in each script rather than a global script. you can achieve the creation of module, import and reuse by using asset.
here is a basic example that shows how to share logic. hope it helps you
-
RE: Generate csv from excel recipe
in the example i use the html-to-xlsx recipe just to quickly generate an xlsx file, but of course this should work with the xlsx recipe too, all that is needed is a recipe that produces xlsx
-
RE: Generate csv from excel recipe
hi @benben-user yes the afterRender is the way to go, here you have a simple example that gives you an idea about how to shape things for your code to work and produce csv
-
RE: address data print new line
hi @silverWeaver, for chrome it should be the same, you need a helper function that handles the conversion from new line character (\r\n) to html line break
<br />
.if you need more help, replicate your template and data on the playground and share it back in this topic
-
RE: Please help me to solve report not rendering very wide table properly (pdf)
hi @Maicol-Casano, there is no magic solution but since the table is so wide it can not fit in the pdf page dimensions. so a solution is to scale the table dynamically (with javascript) so it can fit in the html document.
-
RE: Render Html page from JS Report
@dpkpanchal-hg hi! it is expected that the html that you are generating won't work when inserting on a div, why? because you are generating a full html document (html with
<head>
,<body>
elements), a full document can not be inserting in a standard element (like a<div>
).
in order to embed a document into your existing document (where yourdiv
lives) you have to use the<iframe>
element. depending on how you get the jsreport output you can either use the iframe's srcdoc attribute to embed inline html string, or use something like the createObjectURL to create a blob src url string from your html that you can use in iframe's src attribute -
RE: Does not work with Apple Silicon (M1) using Docker for Desktop Preview
hi! we now (since jsreport 3.9.0) provide arm builds for our docker images, this resolves the issue with Apple Silicon hardware. the full details to run on that hardware are specified here