ah ok, glad that it works on recent versions 👍

BORIS MATOS MORILLO
@bjrmatos
Posts made by bjrmatos
-
RE: Word found unreadable content in ...
-
RE: Word found unreadable content in ...
@msageryd i've tried to reproduce the message you get but i get valid docx, this is the case i am trying https://playground.jsreport.net/w/bjrmatos/zim78tJC
it is better if you provide a plauygroud link to reproduce, maybe there is something else in your data, maybe some invisible character in the json, who knows, but let me know if you can put a playground that produces such invalid docx.
also what is your version of Word? not sure if relevant but this is mine
-
RE: Word found unreadable content in ...
thanks, we will take a look and fix what is wrong.
-
RE: Word found unreadable content in ...
hi, it is likely that some content inside your docx was not transformed correctly. i mean that likely your document has some kind of content that we were not aware, and need that we handle it to avoid corruption.
you can share the template you use to produce this content, so we can take a look and fix. i don't think it is a Mac related problem because my development machine uses macos and i never get this messages for the kind of documents we already support.
-
RE: Docx file preview with JSreport and Docxtemplater
hi! do you have some logs to share? perhaps there is a stack trace there so it points to the exact line of code it fails.
it is likely failing to recognize your docx file template as a valid docx (which is basically a zip file with a .docx extension).
what is exactly
docxTemplate
here? how do you get it? where does it come from? what is the implementation offileToBase64
, it seems the error is here, that the docx is not being serialized properly -
RE: Customize docker image
@v3gard yes, this is expected. before v4 the default user in the image was
root
, so installing os packages like this worked by default.since v4 we introduced a fix that makes the default user, the
jsreport
user, this means that if you want to install os packages or any commands that require admin privileges then you need to switch the user.in your case, i think this should work
FROM jsreport/jsreport:4.1.0 USER root RUN apk add 'libhwy<=1.0.6' \ && apk update \ && apk upgrade \ && npm cache clean -f \ && npm install -g n \ && npm update -y USER jsreport:jsreport
of course, your final image may require other steps, but this is the main idea, if you need to run any command that requires admin priveleges (like running
apk add
) you need do it with root, and switch back to the normaljsreport
user for the actions that does not require it.i will update the docker docs to mention these details about the user.
-
RE: HOW TO OPTIMIZE RENDERING OF LARGE DATA SETS IN JSREPORTS USING LOOPS
So imagine a dataset that generates a template with 20 to 30 full content in letter-size pages including some infographics
it is hard to tell you how to optimize something i don't have full visibility but it seems to me that in this case the loop is not the slowest part, but rather the pdf generation handled by chrome (assuming you are using chrome-pdf recipe), which is slow at generating a table with a lot of rows.
if you render the template in the studio with the same data that the api send, what do you see in the studio profile? that should give you some hints about what took the most part in the render.
the component should be there if you installed jsreport from npm, are you installing this way?
-
RE: Cannot use jsreport.localization.localize in helper
@blizarazu i don't see the @jsreport/jsreport-localization extension used in your code, seems like you are missing that dependency
-
RE: HOW TO OPTIMIZE RENDERING OF LARGE DATA SETS IN JSREPORTS USING LOOPS
@Sesughter01 loops alone are fast, however, it depends on how large the dataset is and also the work that is being done in the loop to determine if the performance decreases. can you show an example code on playground that is slow? perhaps there are easy wins that we can recommend, but at this point i can not give you general advice about what to optimize without looking what you are currently doing
-
RE: Chrome pdf border thickness
@TheNetStriker i understand better what you mean originally, thanks for the details.
unfortunately, it seems any browser-based pdf rendering (like chrome, electron, wkhtmltopdf) will produce this border thickness as the minimum, browsers have a minimum of pixels and always round to that minimum, which translates to the border thickness you see and get.
there is no way to reduce such thickness, the only workaround i know is the same one you found, which involves to use zoom or transform: scale(...) to make the content more thin, however as you mentioned it makes other different content also smaller, which sometimes can be fixed by re-calculating width or font-sizes, etc