I’ve been looking into this as well. While using the pdf-utils and adjusting the pdfSettings in the configuration is the standard way to handle it within jsreport, sometimes the compression isn't as aggressive as I need for certain documents.
If you're just looking for a quick way to shrink a file down before sending it off and don't want to mess with the server-side code right now, I've found this tool pretty handy- https://www.thetoolapp.com/compress-pdf-file/. It’s been a life-saver for me when I'm in a rush.
Curious to see if anyone else has managed to get significantly smaller file sizes just by tweaking the internal jsreport chrome-pdf settings though!
JannetGen
Banned
Posts made by JannetGen
-
RE: Compress PDFposted in general forum
-
RE: How to split a PDF file to couples of small PDFs page by page?posted in general forum
If you’re looking to do this programmatically within jsreport, the script approach mentioned earlier is definitely the way to go for automation.
However, if you just need a quick way to split a specific file manually without messing with the code right now, I’ve used https://thetoolapp.com/utilities/split-files/ before. It’s pretty straightforward for splitting things page-by-page. -
RE: Fill pdf formposted in general forum
I’ve run into similar issues with field mapping in the past. If you're looking for a quick way to test the form structure or just need a straightforward way to see how the fields behave before automating the whole thing, I sometimes use this simple tool- https://thetoolapp.com/pdf-tools/fill-pdf-form/. It’s pretty handy for verifying the PDF side of things while you're debugging your jsreport script.
-
RE: DocxImage in footerposted in general forum
That’s a classic challenge with Word-based reporting. Usually, when images aren't showing up in the footer, it’s because the docxImage helper is struggling with the specific scope of the footer part in the XML.
One thing that often helps is making sure the image data is already fully resolved in your data object before the rendering starts. Also, double-check that you're using a relatively small image file - sometimes the footer container in Word is a bit more sensitive to large base64 strings than the main body is. If you've already tried that, sometimes wrapping the image in a fixed-size table cell in the footer can help "force" the rendering engine to reserve the space properly! -
RE: I need to repeat the header em second pageposted in general forum
If you are using the chrome-pdf recipe, the easiest way is usually to use the native 'Header' and 'Footer' templates in the jsreport studio. Anything you put in that header template section will automatically repeat on every page. Just make sure you leave enough margin in your main template so the header doesn't overlap with your content!
-
RE: Report generation is very slow.posted in general forum
I’ve noticed that when jsreport starts lagging, it’s usually either a massive data object being passed to the template or Chrome's memory management hitting a wall.
One thing that really helped me was switching to the headless Chrome launch strategy in the config, or making sure I wasn't doing heavy data processing inside the Helpers - doing that before passing it to the engine makes a huge difference. Also, if you're using a lot of images or heavy CSS, try checking the "Scripts" execution time in the profiler; sometimes a single synchronous loop in a helper can hang the whole render. -
RE: Docxstyle background color issueposted in general forum
I’ve run into similar styling issues with docx templates before. Word can be really picky about how it interprets background colors compared to a standard browser. Sometimes the docxStyle doesn't apply correctly if there's conflicting 'shading' settings already in the Word document itself. It might be worth checking if the base table or cell in your .docx file has a default fill color set to 'None' or 'No Color' instead of being completely unstyled.
-
RE: Group visibilityPermissions empty after importposted in general forum
That’s a strange one. I’ve seen similar issues with imports before where the core data moves over fine, but the metadata or link tables for permissions don’t seem to 'hook' correctly in the new environment.
Have you checked if the Group IDs in your export file actually match the IDs in the new instance? Sometimes if the groups aren't created in the exact same order or if they have different internal IDs, the permissions end up pointing to nothing. It might also be worth doing a quick check of the logs during the import to see if there are any 'foreign key' or 'unauthorized' errors popping up silently. -
RE: API call to assign user admin rightsposted in general forum
That sounds like a permissions sync issue. Since you're working with the API to elevate rights, have you checked if the changes require a fresh session or a manual cache clear on the jsreport side?
Sometimes the internal store doesn't reflect the new role immediately via the UI even if the API call returns a success. It might be worth trying to re-authenticate the user after the call to see if the admin privileges kick in properly. -
RE: footer overflows to next page or writes multiple timesposted in general forum
That’s a frustrating one, especially when it seems like the footer calculation is just slightly off. Have you tried wrapping the footer content in a fixed-height container or adjusting the marginTop and marginBottom in your Chrome-PDF recipe?
Sometimes Chrome’s rendering engine gets a bit confused with page-break logic if the footer content is too close to the edge. Shrinking the footer font or slightly increasing the bottom margin usually clears up those weird overflows.